cvs: php-src(PHP_4_3) /main streams.c
| From: | Stanislav Malyshev | Date: | Tue, 31 Aug 2004 15:32:09 +0000 |
| Subject: | cvs: php-src(PHP_4_3) /main streams.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-28527@lists.php.net to get a copy of this message | ||
stas Tue Aug 31 11:32:09 2004 EDT
Modified files: (Branch: PHP_4_3)
/php-src/main streams.c
Log:
if not using Zend's alloc, don't touch _emalloc
http://cvs.php.net/diff.php/php-src/main/streams.c?r1=1.125.2.92&r2=1.125.2.93&ty=u
Index: php-src/main/streams.c
diff -u php-src/main/streams.c:1.125.2.92 php-src/main/streams.c:1.125.2.93
--- php-src/main/streams.c:1.125.2.92 Sat Jul 10 06:54:27 2004
+++ php-src/main/streams.c Tue Aug 31 11:32:09 2004
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streams.c,v 1.125.2.92 2004/07/10 10:54:27 wez Exp $ */
+/* $Id: streams.c,v 1.125.2.93 2004/08/31 15:32:09 stas Exp $ */
#define _GNU_SOURCE
#include "php.h"
@@ -59,6 +59,7 @@
/* {{{ 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 @@
( __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)))