com php-src: Fixed reference support: Zend/zend_API.h
| From: | Dmitry Stogov | Date: | Thu, 13 Mar 2014 13:59:50 +0000 |
| Subject: | com php-src: Fixed reference support: Zend/zend_API.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77637@lists.php.net to get a copy of this message | ||
Commit: bfdaf6e8060e6cc9ceb649a5d4b5354688ae45ef
Author: Dmitry Stogov <dmitry@zend.com> Thu, 13 Mar 2014 17:59:50 +0400
Parents: 25d55d16fc0a6e37169167952d8056b19257c1a9
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=bfdaf6e8060e6cc9ceb649a5d4b5354688ae45ef
Log:
Fixed reference support
Changed paths:
M Zend/zend_API.h
Diff:
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index da401fe..206d9cf 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -574,7 +574,12 @@ END_EXTERN_C()
#define ZVAL_ZVAL(z, zv, copy, dtor) do { \
zval *__z = (z); \
zval *__zv = (zv); \
- ZVAL_COPY_VALUE(__z, __zv); \
+ if (EXPECTED(!Z_ISREF_P(__zv))) { \
+ ZVAL_COPY_VALUE(__z, __zv); \
+ } else { \
+ ZVAL_COPY_VALUE(__z, \
+ Z_REFVAL_P(__zv)); \
+ } \
if (copy) { \
zval_copy_ctor(__z); \
} \