summaryrefslogtreecommitdiff
path: root/ext/spl
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl')
-rw-r--r--ext/spl/spl_array.c3
-rw-r--r--ext/spl/spl_dllist.c3
-rw-r--r--ext/spl/spl_heap.c3
-rw-r--r--ext/spl/spl_observer.c3
4 files changed, 4 insertions, 8 deletions
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index a45197114a..672f40e469 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -845,8 +845,7 @@ static HashTable* spl_array_get_debug_info(zval *obj, int *is_temp) /* {{{ */
HashTable *debug_info;
*is_temp = 1;
- ALLOC_HASHTABLE(debug_info);
- ZEND_INIT_SYMTABLE_EX(debug_info, zend_hash_num_elements(intern->std.properties) + 1, 0);
+ debug_info = zend_new_array(zend_hash_num_elements(intern->std.properties) + 1);
zend_hash_copy(debug_info, intern->std.properties, (copy_ctor_func_t) zval_add_ref);
storage = &intern->array;
diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c
index 667a6bad7b..af78e68f4d 100644
--- a/ext/spl/spl_dllist.c
+++ b/ext/spl/spl_dllist.c
@@ -506,8 +506,7 @@ static HashTable* spl_dllist_object_get_debug_info(zval *obj, int *is_temp) /* {
rebuild_object_properties(&intern->std);
}
- ALLOC_HASHTABLE(debug_info);
- zend_hash_init(debug_info, 1, NULL, ZVAL_PTR_DTOR, 0);
+ debug_info = zend_new_array(1);
zend_hash_copy(debug_info, intern->std.properties, (copy_ctor_func_t) zval_add_ref);
pnstr = spl_gen_private_prop_name(spl_ce_SplDoublyLinkedList, "flags", sizeof("flags")-1);
diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c
index 06e4773677..3b179c523f 100644
--- a/ext/spl/spl_heap.c
+++ b/ext/spl/spl_heap.c
@@ -490,8 +490,7 @@ static HashTable* spl_heap_object_get_debug_info_helper(zend_class_entry *ce, zv
rebuild_object_properties(&intern->std);
}
- ALLOC_HASHTABLE(debug_info);
- ZEND_INIT_SYMTABLE_EX(debug_info, zend_hash_num_elements(intern->std.properties) + 1, 0);
+ debug_info = zend_new_array(zend_hash_num_elements(intern->std.properties) + 1);
zend_hash_copy(debug_info, intern->std.properties, (copy_ctor_func_t) zval_add_ref);
pnstr = spl_gen_private_prop_name(ce, "flags", sizeof("flags")-1);
diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c
index de33bd5a6b..c6d366515b 100644
--- a/ext/spl/spl_observer.c
+++ b/ext/spl/spl_observer.c
@@ -295,8 +295,7 @@ static HashTable* spl_object_storage_debug_info(zval *obj, int *is_temp) /* {{{
props = Z_OBJPROP_P(obj);
- ALLOC_HASHTABLE(debug_info);
- ZEND_INIT_SYMTABLE_EX(debug_info, zend_hash_num_elements(props) + 1, 0);
+ debug_info = zend_new_array(zend_hash_num_elements(props) + 1);
zend_hash_copy(debug_info, props, (copy_ctor_func_t)zval_add_ref);
array_init(&storage);