From b311342faf24c72508b5b7f76703e8c5136e61af Mon Sep 17 00:00:00 2001 From: "Thies C. Arntzen" Date: Thu, 7 Oct 1999 12:27:40 +0000 Subject: fixed hopefully last XML problem. that one was hard! --- ext/xml/xml.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'ext/xml/xml.c') diff --git a/ext/xml/xml.c b/ext/xml/xml.c index b8f1bf4bc4..90a1f78589 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -66,7 +66,6 @@ DLEXPORT zend_module_entry *get_module(void) { return &xml_module_entry; } /* }}} */ /* {{{ function prototypes */ - PHP_MINIT_FUNCTION(xml); PHP_RINIT_FUNCTION(xml); PHP_MSHUTDOWN_FUNCTION(xml); @@ -248,6 +247,8 @@ static zval *_xml_resource_zval(long value) ret->type = IS_RESOURCE; ret->value.lval = value; + zend_list_addref(value); + return ret; } @@ -365,7 +366,7 @@ xml_call_handler(xml_parser *parser, char *funcName, int argc, zval **argv) MAKE_STD_ZVAL(retval); retval->type = IS_BOOL; - retval->value.lval = IS_BOOL; + retval->value.lval = 0; /* We cannot call internal variables from a function module as it breaks any chance of compiling it as a module on windows. @@ -379,14 +380,13 @@ xml_call_handler(xml_parser *parser, char *funcName, int argc, zval **argv) zval_dtor(retval); efree(retval); } - zval_dtor(func); - efree(func); + + zval_del_ref(&func); + for (i = 0; i < argc; i++) { - if (i != 0) { /* arg 0 is always our parser-resource - we don't wat to destruct that! */ - zval_dtor(argv[i]); - } - efree(argv[i]); + zval_del_ref(&(argv[i])); } + if (result == FAILURE) { return NULL; } else { -- cgit v1.2.1