derick Tue Jun 7 04:25:30 2005 EDT
Modified files: (Branch: PHP_5_0)
/php-src/main/streams php_streams_int.h
Log:
- MFH: Don't crash when compiled with the zend memory manager disabled.
http://cvs.php.net/diff.php/php-src/main/streams/php_streams_int.h?r1=1.5&r2=1.5.2.1&ty=u
Index: php-src/main/streams/php_streams_int.h
diff -u php-src/main/streams/php_streams_int.h:1.5
php-src/main/streams/php_streams_int.h:1.5.2.1
--- php-src/main/streams/php_streams_int.h:1.5 Thu Jan 8 12:33:06 2004
+++ php-src/main/streams/php_streams_int.h Tue Jun 7 04:25:29 2005
@@ -16,19 +16,25 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_streams_int.h,v 1.5 2004/01/08 17:33:06 sniper Exp $ */
+/* $Id: php_streams_int.h,v 1.5.2.1 2005/06/07 08:25:29 derick Exp $ */
+
#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)))
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php