diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-02-13 22:20:39 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-02-13 22:20:39 +0300 |
commit | e10e151e9b92313a7085272c85bebf6c82017fce (patch) | |
tree | 6cac4100536c5e25143c55d1ab6b2f3b3dc81cf9 /Zend/zend_object_handlers.c | |
parent | bc630ad6da0c6d7cf2d224dba8972499d5691c6b (diff) | |
download | php-git-e10e151e9b92313a7085272c85bebf6c82017fce.tar.gz |
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.
Diffstat (limited to 'Zend/zend_object_handlers.c')
-rw-r--r-- | Zend/zend_object_handlers.c | 4 |
1 files changed, 1 insertions, 3 deletions
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); |