com php-src: Reverted 07fcdc40a0f2af388cff2b6083149a0dd8584003: Zend/zend_variables.c
| From: | Dmitry Stogov | Date: | Thu, 20 Mar 2014 07:48:49 +0000 |
| Subject: | com php-src: Reverted 07fcdc40a0f2af388cff2b6083149a0dd8584003: Zend/zend_variables.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77580@lists.php.net to get a copy of this message | ||
Commit: 1d66808dc475626058c939c4af74e72d8be17c03
Author: Dmitry Stogov <dmitry@zend.com> Thu, 20 Mar 2014 11:48:49 +0400
Parents: 9db5076718d7ed6fc8739676c1a4f57ebe79320b
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1d66808dc475626058c939c4af74e72d8be17c03
Log:
Reverted 07fcdc40a0f2af388cff2b6083149a0dd8584003
Changed paths:
M Zend/zend_variables.c
Diff:
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index 6d5b70e...c7faba8 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -243,16 +243,16 @@ ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
break;
case IS_ARRAY:
case IS_CONSTANT_ARRAY: {
- zval new_arr;
+ HashTable *ht;
TSRMLS_FETCH();
if (Z_ARR_P(zvalue) == &EG(symbol_table)) {
return; /* do nothing */
}
- ZVAL_NEW_ARR(&new_arr);
- zend_hash_init(Z_ARRVAL(new_arr), zend_hash_num_elements(Z_ARRVAL_P(zvalue)), NULL,
ZVAL_PTR_DTOR, 0);
- zend_hash_copy(Z_ARRVAL(new_arr), Z_ARRVAL_P(zvalue), zval_add_ref);
- ZVAL_COPY_VALUE(zvalue, &new_arr);
+ ht = Z_ARRVAL_P(zvalue);
+ ZVAL_NEW_ARR(zvalue);
+ zend_hash_init(Z_ARRVAL_P(zvalue), zend_hash_num_elements(ht), NULL, ZVAL_PTR_DTOR, 0);
+ zend_hash_copy(Z_ARRVAL_P(zvalue), ht, zval_add_ref);
}
break;
case IS_CONSTANT_AST: {