Add HB_CUSTOM_MALLOC definition
So one can use just HB_CUSTOM_MALLOC instead need for define each of hb_*alloc_impl
This commit is contained in:
parent
60959b08e5
commit
7c433ffde2
|
@ -205,10 +205,15 @@
|
|||
|
||||
/* Compile-time custom allocator support. */
|
||||
|
||||
#if defined(hb_malloc_impl) \
|
||||
#if !defined(HB_CUSTOM_MALLOC) \
|
||||
&& defined(hb_malloc_impl) \
|
||||
&& defined(hb_calloc_impl) \
|
||||
&& defined(hb_realloc_impl) \
|
||||
&& defined(hb_free_impl)
|
||||
#define HB_CUSTOM_MALLOC
|
||||
#endif
|
||||
|
||||
#ifdef HB_CUSTOM_MALLOC
|
||||
extern "C" void* hb_malloc_impl(size_t size);
|
||||
extern "C" void* hb_calloc_impl(size_t nmemb, size_t size);
|
||||
extern "C" void* hb_realloc_impl(void *ptr, size_t size);
|
||||
|
|
Loading…
Reference in New Issue