cvs: ZendEngine2(PHP_5_3) / zend_execute.c
[email protected] ("Dmitry Stogov")
| Newsgroups | php.zend-engine.cvs |
|---|---|
| Message-ID | <cvsdmitry1203336707@cvsserver> |
dmitry Mon Feb 18 12:11:47 2008 UTC
Modified files: (Branch: PHP_5_3)
/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.24.2.19&r2=1.716.2.12.2.24.2.20&diff_format=u
Index: ZendEngine2/zend_execute.c
diff -u ZendEngine2/zend_execute.c:1.716.2.12.2.24.2.19 ZendEngine2/zend_execute.c:1.716.2.12.2.24.2.20
--- ZendEngine2/zend_execute.c:1.716.2.12.2.24.2.19 Thu Jan 24 09:41:37 2008
+++ ZendEngine2/zend_execute.c Mon Feb 18 12:11:47 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute.c,v 1.716.2.12.2.24.2.19 2008/01/24 09:41:37 dmitry Exp $ */
+/* $Id: zend_execute.c,v 1.716.2.12.2.24.2.20 2008/02/18 12:11:47 dmitry Exp $ */
#define ZEND_INTENSIVE_DEBUGGING 0
@@ -699,18 +699,12 @@
if (variable_ptr != value) {
zend_uint refcount = Z_REFCOUNT_P(variable_ptr);
- if (!is_tmp_var) {
- Z_ADDREF_P(value);
- }
garbage = *variable_ptr;
*variable_ptr = *value;
Z_SET_REFCOUNT_P(variable_ptr, refcount);
Z_SET_ISREF_P(variable_ptr);
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 (!is_tmp_var) {
- Z_DELREF_P(value);
- }
zendi_zval_dtor(garbage);
return variable_ptr;
}
@@ -738,16 +732,12 @@
if (variable_ptr!=value) {
zend_uint refcount = Z_REFCOUNT_P(variable_ptr);
- if (!is_tmp_var) {
- Z_ADDREF_P(value);
- }
garbage = *variable_ptr;
*variable_ptr = *value;
Z_SET_REFCOUNT_P(variable_ptr, refcount);
Z_SET_ISREF_P(variable_ptr);
if (!is_tmp_var) {
zendi_zval_copy_ctor(*variable_ptr);
- Z_DELREF_P(value);
}
zendi_zval_dtor(garbage);
return variable_ptr;