]> granicus.if.org Git - php/commitdiff
if not using Zend's alloc, don't touch _emalloc
authorStanislav Malyshev <stas@php.net>
Tue, 31 Aug 2004 15:32:09 +0000 (15:32 +0000)
committerStanislav Malyshev <stas@php.net>
Tue, 31 Aug 2004 15:32:09 +0000 (15:32 +0000)
main/streams.c

index 4a1be60af44419b38a8f5de3b10360c8075bc3b4..ebc76c334571e209cb8f418d9d1f6e6d177662f5 100755 (executable)
@@ -59,6 +59,7 @@ static php_stream_wrapper php_plain_files_wrapper;
 
 /* {{{ some macros to help track leaks */
 #if ZEND_DEBUG
+#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) \
@@ -68,7 +69,10 @@ static php_stream_wrapper php_plain_files_wrapper;
                ( __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)))