cvs: ZendEngine2 / zend_object_handlers.c

From: Date: Thu, 27 Nov 2003 19:08:29 +0000
Subject: cvs: ZendEngine2 / zend_object_handlers.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-2012@lists.php.net to get a copy of this message
helly Thu Nov 27 14:08:29 2003 EDT Modified files: /ZendEngine2 zend_object_handlers.c Log: The macro REPLACE_ZVAL_VALUE cannot be used since we only have zval * writeobj. to allow it the api needs to be changed to zval **writeobj. Index: ZendEngine2/zend_object_handlers.c diff -u ZendEngine2/zend_object_handlers.c:1.77 ZendEngine2/zend_object_handlers.c:1.78 --- ZendEngine2/zend_object_handlers.c:1.77 Mon Nov 24 15:57:54 2003 +++ ZendEngine2/zend_object_handlers.c Thu Nov 27 14:08:28 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_object_handlers.c,v 1.77 2003/11/24 20:57:54 helly Exp $ */ +/* $Id: zend_object_handlers.c,v 1.78 2003/11/27 19:08:28 helly Exp $ */ #include "zend.h" #include "zend_globals.h" @@ -885,6 +885,7 @@ int zend_std_cast_object(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC) { zval fname, *retval; + int is_ref, refcount; switch (type) { case IS_STRING: @@ -898,7 +899,13 @@ MAKE_STD_ZVAL(retval); ZVAL_STRINGL(retval, empty_string, 0, 0); } - REPLACE_ZVAL_VALUE(&writeobj, retval, 1); + zval_dtor(writeobj); + is_ref = writeobj->is_ref; + refcount = writeobj->refcount; + *writeobj = *retval; + zval_copy_ctor(writeobj); + writeobj->is_ref = is_ref; + writeobj->refcount = refcount; zval_ptr_dtor(&retval); return SUCCESS; }

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