Skip to content

Commit 08a0030

Browse files
committed
Fix conditional compilation
The new symbols are shared and don't need to depend on the availability of __builtin_constant_p.
1 parent 1a4ace0 commit 08a0030

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Zend/zend_alloc.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2373,9 +2373,6 @@ ZEND_API int is_zend_ptr(const void *ptr)
23732373
return 0;
23742374
}
23752375

2376-
#if !ZEND_DEBUG && defined(HAVE_BUILTIN_CONSTANT_P)
2377-
#undef _emalloc
2378-
23792376
#if ZEND_MM_CUSTOM
23802377

23812378
static ZEND_COLD void* ZEND_FASTCALL _malloc_custom(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
@@ -2404,7 +2401,12 @@ static ZEND_COLD void* ZEND_FASTCALL _realloc_custom(void *ptr, size_t size ZEND
24042401
return AG(mm_heap)->custom_heap.std._realloc(ptr, size);
24052402
}
24062403
}
2404+
#endif
24072405

2406+
#if !ZEND_DEBUG && defined(HAVE_BUILTIN_CONSTANT_P)
2407+
#undef _emalloc
2408+
2409+
#if ZEND_MM_CUSTOM
24082410
# define ZEND_MM_CUSTOM_ALLOCATOR(size) do { \
24092411
if (UNEXPECTED(AG(mm_heap)->use_custom_heap)) { \
24102412
return _malloc_custom(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); \

0 commit comments

Comments
 (0)