cvs: ZendEngine2 / zend_object_handlers.c
| From: | Marcus Boerger | Date: | Sat, 27 Dec 2003 20:16:49 +0000 |
| Subject: | cvs: ZendEngine2 / zend_object_handlers.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-2156@lists.php.net to get a copy of this message | ||
helly Sat Dec 27 15:16:49 2003 EDT
Modified files:
/ZendEngine2 zend_object_handlers.c
Log:
Fix __tostring() and concatenation
Index: ZendEngine2/zend_object_handlers.c
diff -u ZendEngine2/zend_object_handlers.c:1.85 ZendEngine2/zend_object_handlers.c:1.86
--- ZendEngine2/zend_object_handlers.c:1.85 Mon Dec 22 11:27:13 2003
+++ ZendEngine2/zend_object_handlers.c Sat Dec 27 15:16:49 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_object_handlers.c,v 1.85 2003/12/22 16:27:13 helly Exp $ */
+/* $Id: zend_object_handlers.c,v 1.86 2003/12/27 20:16:49 helly Exp $ */
#include "zend.h"
#include "zend_globals.h"
@@ -918,7 +918,6 @@
ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int type, int should_free
TSRMLS_DC)
{
zval fname, *retval;
- int is_ref, refcount;
switch (type) {
case IS_STRING:
@@ -932,13 +931,9 @@
MAKE_STD_ZVAL(retval);
ZVAL_STRINGL(retval, empty_string, 0, 0);
}
- 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;
+ INIT_PZVAL(writeobj);
zval_ptr_dtor(&retval);
return SUCCESS;
}