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_operators.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_operators.c')
-rw-r--r-- | Zend/zend_operators.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 76a3d31a85..0a084036b8 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -566,8 +566,7 @@ ZEND_API void convert_to_array(zval *op) /* {{{ */ HashTable *obj_ht = Z_OBJ_HT_P(op)->get_properties(op); if (obj_ht) { zval arr; - ZVAL_NEW_ARR(&arr); - zend_array_dup(Z_ARRVAL(arr), obj_ht); + ZVAL_ARR(&arr, zend_array_dup(obj_ht)); zval_dtor(op); ZVAL_COPY_VALUE(op, &arr); return; |