]> granicus.if.org Git - php/commitdiff
- Compile fixes for Engine 2
authorAndi Gutmans <andi@php.net>
Tue, 12 Mar 2002 20:28:17 +0000 (20:28 +0000)
committerAndi Gutmans <andi@php.net>
Tue, 12 Mar 2002 20:28:17 +0000 (20:28 +0000)
ext/standard/aggregation.c

index 4a2c0c194d2c67510e2da4bcaa42bf5155da611d..1bb118e5d7e12304c1bea69e51334b05a9585381 100644 (file)
 
 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);