cvs: ZendEngine2(PHP_5_2) / zend_execute.c

From: Date: Thu, 19 Jul 2007 15:29:30 +0000
Subject: cvs: ZendEngine2(PHP_5_2) / zend_execute.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-5911@lists.php.net to get a copy of this message
jani Thu Jul 19 15:29:30 2007 UTC Modified files: (Branch: PHP_5_2) /ZendEngine2 zend_execute.c Log: MFH: Use SEPARATE_ZVAL_IF_NOT_REF for cleaner code. http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute.c?r1=1.716.2.12.2.23&r2=1.716.2.12.2.24&diff_format=u Index: ZendEngine2/zend_execute.c diff -u ZendEngine2/zend_execute.c:1.716.2.12.2.23 ZendEngine2/zend_execute.c:1.716.2.12.2.24 --- ZendEngine2/zend_execute.c:1.716.2.12.2.23 Thu Jul 12 23:33:50 2007 +++ ZendEngine2/zend_execute.c Thu Jul 19 15:29:30 2007 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute.c,v 1.716.2.12.2.23 2007/07/12 23:33:50 iliaa Exp $ */ +/* $Id: zend_execute.c,v 1.716.2.12.2.24 2007/07/19 15:29:30 jani Exp $ */ #define ZEND_INTENSIVE_DEBUGGING 0 @@ -430,17 +430,16 @@ } } +/* this should modify object only if it's empty */ static inline void make_real_object(zval **object_ptr TSRMLS_DC) { -/* this should modify object only if it's empty */ if (Z_TYPE_PP(object_ptr) == IS_NULL - || (Z_TYPE_PP(object_ptr) == IS_BOOL && Z_LVAL_PP(object_ptr)==0) - || (Z_TYPE_PP(object_ptr) == IS_STRING && Z_STRLEN_PP(object_ptr) == 0)) { - - if (!PZVAL_IS_REF(*object_ptr)) { - SEPARATE_ZVAL(object_ptr); - } + || (Z_TYPE_PP(object_ptr) == IS_BOOL && Z_LVAL_PP(object_ptr) == 0) + || (Z_TYPE_PP(object_ptr) == IS_STRING && Z_STRLEN_PP(object_ptr) == 0) + ) { zend_error(E_STRICT, "Creating default object from empty value"); + + SEPARATE_ZVAL_IF_NOT_REF(object_ptr); zval_dtor(*object_ptr); object_init(*object_ptr); }

« previous php.zend-engine.cvs (#5911) next »