The fix affects get_properties() callback only in the moments when GC is
in progress (not when GC is enabled).
The SimpleXML extensions already makes a trick keeping and reusing
"fictive" properties HashTable, so I've extend it to support GC.
Thanks. Dmitry.
Marcus Boerger wrote:
Hello Dmitry,
Tuesday, January 29, 2008, 10:59:42 AM, you wrote:
[...]
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.35.2.8&r2=1.151.2.22.2.35.2.9&diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.8
php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.9
--- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.8 Wed Jan 23
09:52:57 2008
+++ php-src/ext/simplexml/simplexml.c Tue Jan 29 09:59:42 2008
@@ -1081,6 +1081,9 @@
zend_hash_init(rv, 0, NULL, ZVAL_PTR_DTOR, 0);
}
else if (sxe->properties) {
+ if (GC_G(gc_active)) {
+ return sxe->properties;
+ }
zend_hash_clean(sxe->properties);
rv = sxe->properties;
} else {
Excuse my ignorance to the GC stuff :-) but this change results in a very
big change of behavior, so how is this a fix?
Best regards,
Marcus
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php