From e10e151e9b92313a7085272c85bebf6c82017fce Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 13 Feb 2015 22:20:39 +0300 Subject: Merged zend_array and HashTable into the single data structure. Now each HashTable is also zend_array, so it's refcounted and may be a subject for Copy on Write zend_array_dup() was changed to allocate and return HashTable, instead of taking preallocated HashTable as argument. --- Zend/zend_object_handlers.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Zend/zend_object_handlers.c') diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 9a376aa1a0..eba9cea43c 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -150,9 +150,7 @@ ZEND_API HashTable *zend_std_get_debug_info(zval *object, int *is_temp) /* {{{ * if (Z_TYPE(retval) == IS_ARRAY) { if (Z_IMMUTABLE(retval)) { *is_temp = 1; - ALLOC_HASHTABLE(ht); - zend_array_dup(ht, Z_ARRVAL(retval)); - return ht; + return zend_array_dup(Z_ARRVAL(retval)); } else if (Z_REFCOUNT(retval) <= 1) { *is_temp = 1; ALLOC_HASHTABLE(ht); -- cgit v1.2.1