diff options
author | Daan <daanl@outlook.com> | 2022-04-07 16:12:30 -0700 |
---|---|---|
committer | Daan <daanl@outlook.com> | 2022-04-07 16:12:30 -0700 |
commit | 2a4a3dfa23dbddc1bed7e61d567b9ca4d9ffba87 (patch) | |
tree | 5baa0fa3f5a1a3bd8c538d35eeea4f22d78885e7 /src/alloc-override.c | |
parent | 0075a81879b670a87b56e078bad942671331a4bb (diff) | |
parent | 25ecec3c3b77a85f1344bacb6c9538c555b49e12 (diff) |
Merge branch 'dev' into dev-slice
Diffstat (limited to 'src/alloc-override.c')
-rw-r--r-- | src/alloc-override.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/alloc-override.c b/src/alloc-override.c index 0c9ece9..12e9e0d 100644 --- a/src/alloc-override.c +++ b/src/alloc-override.c @@ -94,15 +94,18 @@ typedef struct mi_nothrow_s { int _tag; } mi_nothrow_t; #ifdef __cplusplus extern "C" { - void _ZdlPv(void* p); // delete - void _ZdaPv(void* p); // delete[] - void _ZdlPvm(void* p, size_t n); // delete - void _ZdaPvm(void* p, size_t n); // delete[] - void* _Znwm(size_t n); // new - void* _Znam(size_t n); // new[] - void* _ZnwmRKSt9nothrow_t(size_t n, mi_nothrow_t tag); // new nothrow - void* _ZnamRKSt9nothrow_t(size_t n, mi_nothrow_t tag); // new[] nothrow - } + #endif + void _ZdlPv(void* p); // delete + void _ZdaPv(void* p); // delete[] + void _ZdlPvm(void* p, size_t n); // delete + void _ZdaPvm(void* p, size_t n); // delete[] + void* _Znwm(size_t n); // new + void* _Znam(size_t n); // new[] + void* _ZnwmRKSt9nothrow_t(size_t n, mi_nothrow_t tag); // new nothrow + void* _ZnamRKSt9nothrow_t(size_t n, mi_nothrow_t tag); // new[] nothrow + #ifdef __cplusplus + } + #endif __attribute__((used)) static struct mi_interpose_s _mi_cxx_interposes[] __attribute__((section("__DATA, __interpose"))) = { MI_INTERPOSE_FUN(_ZdlPv,mi_free), @@ -114,7 +117,6 @@ typedef struct mi_nothrow_s { int _tag; } mi_nothrow_t; MI_INTERPOSE_FUN(_ZnwmRKSt9nothrow_t,mi_new_nothrow), MI_INTERPOSE_FUN(_ZnamRKSt9nothrow_t,mi_new_nothrow), }; - #endif // __cplusplus #elif defined(_MSC_VER) // cannot override malloc unless using a dll. |