]> granicus.if.org Git - php/commitdiff
Don't crash when compiled with the zend memory manager disabled.
authorWez Furlong <wez@php.net>
Mon, 6 Jun 2005 01:52:18 +0000 (01:52 +0000)
committerWez Furlong <wez@php.net>
Mon, 6 Jun 2005 01:52:18 +0000 (01:52 +0000)
main/streams/php_streams_int.h

index a753343463039c962a90abe729d0d9db809ec11f..f5826b83967bf7c1a33d05cfd5dd58636e69575a 100644 (file)
 
 /* $Id$ */
 
+
 #if ZEND_DEBUG
-#define emalloc_rel_orig(size) \
+
+#if USE_ZEND_ALLOC
+# define emalloc_rel_orig(size)        \
                ( __php_stream_call_depth == 0 \
                ? _emalloc((size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_RELAY_CC) \
                : _emalloc((size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC) )
 
-#define erealloc_rel_orig(ptr, size)   \
+# define erealloc_rel_orig(ptr, size)  \
                ( __php_stream_call_depth == 0 \
                ? _erealloc((ptr), (size), 0 ZEND_FILE_LINE_CC ZEND_FILE_LINE_RELAY_CC) \
                : _erealloc((ptr), (size), 0 ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC) )
-
+#else
+# define emalloc_rel_orig(size)                        emalloc(size)
+# define erealloc_rel_orig(ptr, size)  erealloc(ptr, size)
+#endif
 
 #define pemalloc_rel_orig(size, persistent)    ((persistent) ? malloc((size)) : emalloc_rel_orig((size)))
 #define perealloc_rel_orig(ptr, size, persistent)      ((persistent) ? realloc((ptr), (size)) : erealloc_rel_orig((ptr), (size)))