cvs: ZendEngine2 / zend_execute.c

From: Date: Thu, 19 Jul 2007 15:28:47 +0000
Subject: cvs: ZendEngine2 / zend_execute.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-5910@lists.php.net to get a copy of this message
jani Thu Jul 19 15:28:47 2007 UTC Modified files: /ZendEngine2 zend_execute.c Log: - Use the SEPARATE_ZVAL_IF_NOT_REF macro (cleanup code) http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute.c?r1=1.767&r2=1.768&diff_format=u Index: ZendEngine2/zend_execute.c diff -u ZendEngine2/zend_execute.c:1.767 ZendEngine2/zend_execute.c:1.768 --- ZendEngine2/zend_execute.c:1.767 Wed Jul 11 11:19:58 2007 +++ ZendEngine2/zend_execute.c Thu Jul 19 15:28:47 2007 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute.c,v 1.767 2007/07/11 11:19:58 tony2001 Exp $ */ +/* $Id: zend_execute.c,v 1.768 2007/07/19 15:28:47 jani Exp $ */ #define ZEND_INTENSIVE_DEBUGGING 0 @@ -470,17 +470,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_BOOL && Z_LVAL_PP(object_ptr) == 0) || (Z_TYPE_PP(object_ptr) == IS_STRING && Z_STRLEN_PP(object_ptr) == 0) - || (Z_TYPE_PP(object_ptr) == IS_UNICODE && Z_USTRLEN_PP(object_ptr) == 0)) { - if (!PZVAL_IS_REF(*object_ptr)) { - SEPARATE_ZVAL(object_ptr); - } + || (Z_TYPE_PP(object_ptr) == IS_UNICODE && Z_USTRLEN_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 (#5910) next »