pollita Mon Jun 16 14:19:14 2003 EDT Modified files: /php4/ext/standard streamsfuncs.c /php4/main/streams streams.c Log: optionvalue is being copied via zval_copy_ctor, there's no need to addref the original Index: php4/ext/standard/streamsfuncs.c diff -u php4/ext/standard/streamsfuncs.c:1.16 php4/ext/standard/streamsfuncs.c:1.17 --- php4/ext/standard/streamsfuncs.c:1.16 Fri Jun 13 17:33:59 2003 +++ php4/ext/standard/streamsfuncs.c Mon Jun 16 14:19:14 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streamsfuncs.c,v 1.16 2003/06/13 21:33:59 pollita Exp $ */ +/* $Id: streamsfuncs.c,v 1.17 2003/06/16 18:19:14 pollita Exp $ */ #include "php.h" #include "php_globals.h" @@ -650,7 +650,6 @@ while (SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_PP(wval), (void**)&oval, &opos)) { if (HASH_KEY_IS_STRING == zend_hash_get_current_key_ex(Z_ARRVAL_PP(wval), &okey, &okey_len, NULL, 0, &opos)) { - ZVAL_ADDREF(*oval); php_stream_context_set_option(context, wkey, okey, *oval); } zend_hash_move_forward_ex(Z_ARRVAL_PP(wval), &opos); Index: php4/main/streams/streams.c diff -u php4/main/streams/streams.c:1.26 php4/main/streams/streams.c:1.27 --- php4/main/streams/streams.c:1.26 Sat Jun 14 15:30:42 2003 +++ php4/main/streams/streams.c Mon Jun 16 14:19:14 2003 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streams.c,v 1.26 2003/06/14 19:30:42 helly Exp $ */ +/* $Id: streams.c,v 1.27 2003/06/16 18:19:14 pollita Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -1676,7 +1676,6 @@ return FAILURE; } - ZVAL_ADDREF(optionvalue); wrapperhash = &category; } return zend_hash_update(Z_ARRVAL_PP(wrapperhash), (char*)optionname, strlen(optionname)+1, (void**)&copied_val, sizeof(zval *), NULL);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php