Merge branch 'master' into dev

This commit is contained in:
daan 2019-06-25 19:57:45 -07:00
commit 654bcd7049
3 changed files with 11 additions and 1 deletions

View file

@ -25,7 +25,7 @@ terms of the MIT license. A copy of the license can be found in the file
#if (defined(__GNUC__) || defined(__clang__)) && !defined(__MACH__)
// use aliasing to alias the exported function to one of our `mi_` functions
#define MI_FORWARD(fun) __attribute__((alias(#fun), used));
#define MI_FORWARD(fun) __attribute__((alias(#fun), used, visibility("default")));
#define MI_FORWARD1(fun,x) MI_FORWARD(fun)
#define MI_FORWARD2(fun,x,y) MI_FORWARD(fun)
#define MI_FORWARD0(fun,x) MI_FORWARD(fun)
@ -60,6 +60,10 @@ terms of the MIT license. A copy of the license can be found in the file
void free(void* p) mi_attr_noexcept MI_FORWARD0(mi_free, p)
#endif
#if (defined(__GNUC__) || defined(__clang__)) && !defined(__MACH__)
#pragma GCC visibility push(default)
#endif
// ------------------------------------------------------
// Override new/delete
// This is not really necessary as they usually call
@ -189,4 +193,8 @@ void* reallocarray( void* p, size_t count, size_t size ) { // BSD
}
#endif
#if (defined(__GNUC__) || defined(__clang__)) && !defined(__MACH__)
#pragma GCC visibility pop
#endif
#endif // MI_MALLOC_OVERRIDE & !_WIN32