cvs: php4 /ext/xml xml.c
| From: | Andi Gutmans | Date: | Sat, 29 Dec 2001 18:10:01 +0000 |
| Subject: | cvs: php4 /ext/xml xml.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-8841@lists.php.net to get a copy of this message | ||
andi Sat Dec 29 13:10:01 2001 EDT
Modified files:
/php4/ext/xml xml.c
Log:
- Fix bug in XML extension which exists due to a not perfect work around
- with ZE1. In ZE2 the correct code seems to work well.
Index: php4/ext/xml/xml.c
diff -u php4/ext/xml/xml.c:1.101 php4/ext/xml/xml.c:1.102
--- php4/ext/xml/xml.c:1.101 Mon Dec 17 16:01:06 2001
+++ php4/ext/xml/xml.c Sat Dec 29 13:10:01 2001
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xml.c,v 1.101 2001/12/17 21:01:06 hholzgra Exp $ */
+/* $Id: xml.c,v 1.102 2001/12/29 18:10:01 andi Exp $ */
#define IS_EXT_MODULE
@@ -289,11 +289,12 @@
{
xml_parser *parser = (xml_parser *)rsrc->ptr;
- /* please leave this commented - or ask thies@thieso.net before doing it (again)
+ /* please leave this commented - or ask thies@thieso.net before doing it (again) */
+#ifdef ZEND_ENGINE_2
if (parser->object) {
zval_ptr_dtor(&parser->object);
}
- */
+#endif
if (parser->parser) {
XML_ParserFree(parser->parser);
@@ -1126,17 +1127,19 @@
ZEND_FETCH_RESOURCE(parser,xml_parser *,pind, -1, "XML Parser", le_xml_parser);
- /* please leave this commented - or ask thies@thieso.net before doing it (again)
+ /* please leave this commented - or ask thies@thieso.net before doing it (again) */
+#ifdef ZEND_ENGINE_2
if (parser->object) {
zval_ptr_dtor(&parser->object);
}
- */
+#endif
parser->object = *mythis;
- /* please leave this commented - or ask thies@thieso.net before doing it (again)
+ /* please leave this commented - or ask thies@thieso.net before doing it (again) */
+#ifdef ZEND_ENGINE_2
zval_add_ref(&parser->object);
- */
+#endif
RETVAL_TRUE;
}