summaryrefslogtreecommitdiff
path: root/Zend/zend_operators.h
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2015-06-11 19:41:43 +0200
committerNikita Popov <nikic@php.net>2015-06-11 23:23:57 +0200
commit5d3cf577aad15b119c137a873f468c0614f2eb2e (patch)
treeabc522e177e51e526c5be4aef6cb42c911ed2cce /Zend/zend_operators.h
parent25098f0f5c50249200b1dd80619c782d961287a2 (diff)
downloadphp-git-5d3cf577aad15b119c137a873f468c0614f2eb2e.tar.gz
Make convert_to_* safe with rc>1
This only involves switching zval_dtor to zval_ptr_dtor for arrays and making the convert_to_object for arrays a bit more generic. All the other changes outside zend_operators.c just make use of this new ability (use COPY instead of DUP). What's still missing: Proper references handling. I've seen many convert_to* calls that will break when a reference is used. Also fixes bug #69788.
Diffstat (limited to 'Zend/zend_operators.h')
-rw-r--r--Zend/zend_operators.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index c026f23415..17d1bcffb4 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -364,7 +364,6 @@ ZEND_API void ZEND_FASTCALL zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_D
#define convert_to_ex_master(pzv, lower_type, upper_type) \
if (Z_TYPE_P(pzv)!=upper_type) { \
- SEPARATE_ZVAL_IF_NOT_REF(pzv); \
convert_to_##lower_type(pzv); \
}
@@ -400,7 +399,6 @@ ZEND_API void ZEND_FASTCALL zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_D
#define convert_to_explicit_type_ex(pzv, str_type) \
if (Z_TYPE_P(pzv) != str_type) { \
- SEPARATE_ZVAL_IF_NOT_REF(pzv); \
convert_to_explicit_type(pzv, str_type); \
}
@@ -414,7 +412,6 @@ ZEND_API void ZEND_FASTCALL zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_D
#define convert_scalar_to_number_ex(pzv) \
if (Z_TYPE_P(pzv)!=IS_LONG && Z_TYPE_P(pzv)!=IS_DOUBLE) { \
- SEPARATE_ZVAL_IF_NOT_REF(pzv); \
convert_scalar_to_number(pzv); \
}