summaryrefslogtreecommitdiff
path: root/Zend/zend_execute.h
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_execute.h')
-rw-r--r--Zend/zend_execute.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h
index 5a344a63ce..738895e73c 100644
--- a/Zend/zend_execute.h
+++ b/Zend/zend_execute.h
@@ -84,12 +84,7 @@ static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval
garbage = Z_COUNTED_P(variable_ptr);
if (--GC_REFCOUNT(garbage) == 0) {
ZVAL_COPY_VALUE(variable_ptr, value);
- if (value_type == IS_CONST) {
- /* IS_CONST can't be IS_OBJECT, IS_RESOURCE or IS_REFERENCE */
- if (UNEXPECTED(Z_OPT_COPYABLE_P(variable_ptr))) {
- zval_copy_ctor_func(variable_ptr);
- }
- } else if (value_type == IS_CV) {
+ if (value_type & (IS_CONST|IS_CV)) {
if (UNEXPECTED(Z_OPT_REFCOUNTED_P(variable_ptr))) {
Z_ADDREF_P(variable_ptr);
}
@@ -113,12 +108,7 @@ static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval
} while (0);
ZVAL_COPY_VALUE(variable_ptr, value);
- if (value_type == IS_CONST) {
- /* IS_CONST can't be IS_OBJECT, IS_RESOURCE or IS_REFERENCE */
- if (UNEXPECTED(Z_OPT_COPYABLE_P(variable_ptr))) {
- zval_copy_ctor_func(variable_ptr);
- }
- } else if (value_type == IS_CV) {
+ if (value_type & (IS_CONST|IS_CV)) {
if (UNEXPECTED(Z_OPT_REFCOUNTED_P(variable_ptr))) {
Z_ADDREF_P(variable_ptr);
}