com php-src: Call zend_array_dup() instead of zva l_copy_ctor().: Zend/zend_types.h
| From: | Dmitry Stogov | Date: | Tue, 02 Jun 2015 09:03:34 +0000 |
| Subject: | com php-src: Call zend_array_dup() instead of zva l_copy_ctor().: Zend/zend_types.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-87046@lists.php.net to get a copy of this message | ||
Commit: 8a089e7e71bfcb0829e97feb42a7495f8e39e1b4
Author: Dmitry Stogov <dmitry@zend.com> Tue, 2 Jun 2015 12:03:34 +0300
Parents: 0d054f5fafeeadb40edbf62a9bdae635965b5b5c
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8a089e7e71bfcb0829e97feb42a7495f8e39e1b4
Log:
Call zend_array_dup() instead of zval_copy_ctor().
Changed paths:
M Zend/zend_types.h
Diff:
diff --git a/Zend/zend_types.h b/Zend/zend_types.h
index c1fceab..6356518 100644
--- a/Zend/zend_types.h
+++ b/Zend/zend_types.h
@@ -890,11 +890,12 @@ static zend_always_inline uint32_t zval_delref_p(zval* pz) {
#define SEPARATE_ARRAY(zv) do { \
zval *_zv = (zv); \
- if (Z_REFCOUNT_P(_zv) > 1) { \
+ zend_array *_arr = Z_ARR_P(_zv); \
+ if (GC_REFCOUNT(_arr) > 1) { \
if (!Z_IMMUTABLE_P(_zv)) { \
- Z_DELREF_P(_zv); \
+ GC_REFCOUNT(_arr)--; \
} \
- zval_copy_ctor_func(_zv); \
+ ZVAL_ARR(_zv, zend_array_dup(_arr)); \
} \
} while (0)