From 4a3df17f434cb9f4db711df2904cb69782852413 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 18 Feb 2008 12:11:34 +0000 Subject: [PATCH] Removed redundant refcount manipulations --- Zend/zend_execute.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 6fdb95e6ba..1630ba7f12 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -736,18 +736,12 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2 zend_uint refcount = variable_ptr->refcount; zval garbage; - if (type != IS_TMP_VAR) { - value->refcount++; - } garbage = *variable_ptr; *variable_ptr = *value; variable_ptr->refcount = refcount; variable_ptr->is_ref = 1; zend_error(E_STRICT, "Implicit cloning object of class '%s' because of 'zend.ze1_compatibility_mode'", class_name); variable_ptr->value.obj = Z_OBJ_HANDLER_P(value, clone_obj)(value TSRMLS_CC); - if (type != IS_TMP_VAR) { - value->refcount--; - } zendi_zval_dtor(garbage); } } else { @@ -775,16 +769,12 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2 zend_uint refcount = variable_ptr->refcount; zval garbage; - if (type!=IS_TMP_VAR) { - value->refcount++; - } garbage = *variable_ptr; *variable_ptr = *value; variable_ptr->refcount = refcount; variable_ptr->is_ref = 1; if (type!=IS_TMP_VAR) { zendi_zval_copy_ctor(*variable_ptr); - value->refcount--; } zendi_zval_dtor(garbage); } -- 2.50.1