andrei Wed Jun 4 14:57:53 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard aggregation.c Log: Fix a couple of aggregation bugs: - Needed to add a reference to a function when copying (#23574) - Due to pecularity of ZE1 object zvals could be re-used, so we always set the new class entry explicitly. Index: php4/ext/standard/aggregation.c diff -u php4/ext/standard/aggregation.c:1.11.4.4 php4/ext/standard/aggregation.c:1.11.4.5 --- php4/ext/standard/aggregation.c:1.11.4.4 Sun Feb 9 14:10:32 2003 +++ php4/ext/standard/aggregation.c Wed Jun 4 14:57:53 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: aggregation.c,v 1.11.4.4 2003/02/09 19:10:32 sniper Exp $ */ +/* $Id: aggregation.c,v 1.11.4.5 2003/06/04 18:57:53 andrei Exp $ */ #include "php.h" #include "basic_functions.h" @@ -134,7 +134,7 @@ */ if (zend_hash_add(&ce->function_table, func_name, func_name_len, (void*)function, sizeof(zend_function), NULL) == SUCCESS) { - + function_add_ref(function); add_next_index_stringl(aggr_methods, func_name, func_name_len-1, 1); } @@ -402,8 +402,6 @@ * and stuff this where it belongs so we don't have to work so hard next * time. */ - /* OBJECT FIXME!! won't work with non-standard objects */ - (Z_OBJ_P(obj))->ce = new_ce; aggr_info_new.new_ce = new_ce; MAKE_STD_ZVAL(aggr_info_new.aggr_members); array_init(aggr_info_new.aggr_members); @@ -417,6 +415,9 @@ */ new_ce = aggr_info->new_ce; } + + /* OBJECT FIXME!! won't work with non-standard objects */ + (Z_OBJ_P(obj))->ce = new_ce; /* * This should be easy to understand. If not, ask Rasmus about it at his
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php