cvs: /php4 ChangeLog /php4/ext/xml xml.c

From: Date: Thu, 07 Oct 1999 12:28:11 +0000
Subject: cvs: /php4 ChangeLog /php4/ext/xml xml.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-5275@lists.php.net to get a copy of this message
thies Thu Oct 7 08:28:11 1999 EDT Modified files: /php4 ChangeLog /php4/ext/xml xml.c Log: fixed hopefully last XML problem. that one was hard! Index: php4/ChangeLog diff -u php4/ChangeLog:1.173 php4/ChangeLog:1.174 --- php4/ChangeLog:1.173 Thu Oct 7 05:13:39 1999 +++ php4/ChangeLog Thu Oct 7 08:27:39 1999 @@ -3,6 +3,7 @@ ?? ?? 1999, Version 4.0 Beta 3 +- Fixed refcount problem in XML module. (Thies) - Fixed crash in HTTP_RAW_POST_DATA handling (Thies) - You can use resources as array-indices again (Thies, Zend library) - Fixed pg_fetch_array() with three arguments (Sascha) Index: php4/ext/xml/xml.c diff -u php4/ext/xml/xml.c:1.24 php4/ext/xml/xml.c:1.25 --- php4/ext/xml/xml.c:1.24 Mon Oct 4 11:18:22 1999 +++ php4/ext/xml/xml.c Thu Oct 7 08:27:40 1999 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xml.c,v 1.24 1999/10/04 15:18:22 sas Exp $ */ +/* $Id: xml.c,v 1.25 1999/10/07 12:27:40 thies Exp $ */ #define IS_EXT_MODULE #if COMPILE_DL @@ -66,7 +66,6 @@ /* }}} */ /* {{{ function prototypes */ - PHP_MINIT_FUNCTION(xml); PHP_RINIT_FUNCTION(xml); PHP_MSHUTDOWN_FUNCTION(xml); @@ -248,6 +247,8 @@ ret->type = IS_RESOURCE; ret->value.lval = value; + zend_list_addref(value); + return ret; } @@ -365,7 +366,7 @@ 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 @@ 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 {

« previous php.version4 (#5275) next »