From: Dmitry Stogov Date: Mon, 18 Feb 2008 12:11:34 +0000 (+0000) Subject: Removed redundant refcount manipulations X-Git-Tag: php-5.2.6RC1~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4a3df17f434cb9f4db711df2904cb69782852413;p=php Removed redundant refcount manipulations --- 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); }