cvs: php4 /ext/standard aggregation.c

From: Date: Tue, 12 Mar 2002 20:28:17 +0000
Subject: cvs: php4 /ext/standard aggregation.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-10043@lists.php.net to get a copy of this message
andi Tue Mar 12 15:28:17 2002 EDT Modified files: /php4/ext/standard aggregation.c Log: - Compile fixes for Engine 2 Index: php4/ext/standard/aggregation.c diff -u php4/ext/standard/aggregation.c:1.3 php4/ext/standard/aggregation.c:1.4 --- php4/ext/standard/aggregation.c:1.3 Sat Mar 2 11:41:55 2002 +++ php4/ext/standard/aggregation.c Tue Mar 12 15:28:17 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: aggregation.c,v 1.3 2002/03/02 16:41:55 hholzgra Exp $ */ +/* $Id: aggregation.c,v 1.4 2002/03/12 20:28:17 andi Exp $ */ #include "php.h" #include "basic_functions.h" @@ -27,9 +27,15 @@ static void aggregation_info_dtor(aggregation_info *info) { + /* FIXME: This is here to make it compile with Engine 2 but part of this module will need rewriting */ +#ifndef ZEND_ENGINE_2 destroy_zend_class(info->new_ce); +#else + destroy_zend_class(&info->new_ce); +#endif efree(info->new_ce); zval_ptr_dtor(&info->aggr_members); + } /* {{{ static zval* array_to_hash */ @@ -334,8 +340,12 @@ new_ce->name = estrndup(Z_OBJCE_P(obj)->name, Z_OBJCE_P(obj)->name_length); new_ce->name_length = Z_OBJCE_P(obj)->name_length; new_ce->parent = Z_OBJCE_P(obj)->parent; +#ifdef ZEND_ENGINE_2 + new_ce->refcount = 1; +#else new_ce->refcount = (int *) emalloc(sizeof(int)); *new_ce->refcount = 1; +#endif new_ce->constants_updated = Z_OBJCE_P(obj)->constants_updated; zend_hash_init(&new_ce->function_table, 10, NULL, ZEND_FUNCTION_DTOR, 0); zend_hash_init(&new_ce->default_properties, 10, NULL, ZVAL_PTR_DTOR, 0);

« previous php.cvs (#10043) next »