summaryrefslogtreecommitdiff
path: root/ext/standard/aggregation.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2002-03-12 20:28:17 +0000
committerAndi Gutmans <andi@php.net>2002-03-12 20:28:17 +0000
commit617b26f41de96699bd2141241a6547ea37e4d4d1 (patch)
tree86a17414c95d88b40d0530fff82beac8ca0edbbd /ext/standard/aggregation.c
parentc8e7db984c8b80e6a7c930f58e21d1ee941ccaa9 (diff)
downloadphp-git-617b26f41de96699bd2141241a6547ea37e4d4d1.tar.gz
- Compile fixes for Engine 2
Diffstat (limited to 'ext/standard/aggregation.c')
-rw-r--r--ext/standard/aggregation.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/standard/aggregation.c b/ext/standard/aggregation.c
index 4a2c0c194d..1bb118e5d7 100644
--- a/ext/standard/aggregation.c
+++ b/ext/standard/aggregation.c
@@ -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 @@ static void aggregate(INTERNAL_FUNCTION_PARAMETERS, int aggr_what, int aggr_type
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);