moriyoshi Thu Oct 2 15:45:06 2003 EDT
Modified files:
/php-src/ext/simplexml simplexml.c
Log:
A temporary voodoo hack to avoid memory leaks.
# Stuff of this kind must be removed if any neater way is out there.
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.59 php-src/ext/simplexml/simplexml.c:1.60
--- php-src/ext/simplexml/simplexml.c:1.59 Fri Aug 22 11:04:22 2003
+++ php-src/ext/simplexml/simplexml.c Thu Oct 2 15:45:05 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: simplexml.c,v 1.59 2003/08/22 15:04:22 wez Exp $ */
+/* $Id: simplexml.c,v 1.60 2003/10/02 19:45:05 moriyoshi Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -269,6 +269,7 @@
static zval **
sxe_property_get_ptr(zval *object, zval *member TSRMLS_DC)
{
+#if 0
zval **property_ptr;
zval *property;
@@ -279,6 +280,22 @@
*property_ptr = property;
return property_ptr;
+#else
+ /* necessary voodoo hack */
+ struct compounded_zval_ptr {
+ zval zv;
+ zval *pzv;
+ };
+
+ zval *property;
+
+ property = sxe_property_read(object, member, 0 TSRMLS_CC);
+ property = erealloc(property, sizeof(struct compounded_zval_ptr));
+
+ ((struct compounded_zval_ptr *)property)->pzv = property;
+
+ return &((struct compounded_zval_ptr *)property)->pzv;
+#endif
}
/* }}} */
@@ -1068,7 +1085,7 @@
{
php_info_print_table_start();
php_info_print_table_header(2, "Simplexml support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.59 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.60 $");
php_info_print_table_end();
}
/* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php