1
0
mirror of https://github.com/php/php-src.git synced 2026-04-09 17:13:31 +02:00

Fixed SEPARATE_ZVAL_IF_REF()

This commit is contained in:
Dmitry Stogov
2014-02-28 12:21:12 +04:00
parent 142dd01006
commit cee824bbef

View File

@@ -703,6 +703,15 @@ END_EXTERN_C()
#define SEPARATE_ZVAL_IF_REF(zv) \
if (Z_ISREF_P(zv)) { \
if (Z_REFCOUNT_P(zv) == 1) { \
zend_reference *ref = Z_REF_P(zv); \
ZVAL_COPY_VALUE(zv, &ref->val); \
efree(ref); \
} else { \
zval *ref = Z_REFVAL_P(zv); \
Z_DELREF_P(zv); \
ZVAL_DUP(zv, ref); \
} \
SEPARATE_ZVAL(zv); \
}