cvs: ZendEngine2(PHP_5_2) / zend_execute.c

[email protected] ("Dmitry Stogov")
Newsgroups php.zend-engine.cvs
Message-ID <cvsdmitry1203336695@cvsserver>
dmitry		Mon Feb 18 12:11:35 2008 UTC

  Modified files:              (Branch: PHP_5_2)
    /ZendEngine2	zend_execute.c 
  Log:
  Removed redundant refcount manipulations
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute.c?r1=1.716.2.12.2.26&r2=1.716.2.12.2.27&diff_format=u
Index: ZendEngine2/zend_execute.c
diff -u ZendEngine2/zend_execute.c:1.716.2.12.2.26 ZendEngine2/zend_execute.c:1.716.2.12.2.27
--- ZendEngine2/zend_execute.c:1.716.2.12.2.26	Thu Jan 24 08:51:04 2008
+++ ZendEngine2/zend_execute.c	Mon Feb 18 12:11:34 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_execute.c,v 1.716.2.12.2.26 2008/01/24 08:51:04 dmitry Exp $ */
+/* $Id: zend_execute.c,v 1.716.2.12.2.27 2008/02/18 12:11:34 dmitry Exp $ */
 
 #define ZEND_INTENSIVE_DEBUGGING 0
 
@@ -736,18 +736,12 @@
  				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 @@
 			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);
 		}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.