summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2001-12-29 18:10:01 +0000
committerAndi Gutmans <andi@php.net>2001-12-29 18:10:01 +0000
commit66d88ba07b01e637a51b21d3435f541a3bb55627 (patch)
tree9c75323451783f7aaf8c2e5716623c36af11d4f4
parent8a0c756c58ee49ac35e63d5c9cab393fd0ea83fb (diff)
downloadphp-git-66d88ba07b01e637a51b21d3435f541a3bb55627.tar.gz
- 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.
-rw-r--r--ext/xml/xml.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/ext/xml/xml.c b/ext/xml/xml.c
index f523ba819b..1647a4f317 100644
--- a/ext/xml/xml.c
+++ b/ext/xml/xml.c
@@ -289,11 +289,12 @@ static void xml_parser_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
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 @@ PHP_FUNCTION(xml_set_object)
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;
}