Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_operators.c

From: Date: Thu, 13 Nov 2003 22:06:03 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_operators.c
References: 1  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1983@lists.php.net to get a copy of this message
It would probably best to make tmp a zval *, MAKE_STD_ZVAL() it and then pass it to the method. We would then zval_ptr_dtor() op and set it to tmp. What do you think? Andi At 08:53 PM 11/13/2003 +0000, Moriyoshi Koizumi wrote:
moriyoshi               Thu Nov 13 15:53:56 2003 EDT
Modified files:
    /ZendEngine2        zend_operators.c
Log: Bugfix #26156 (REPLACE_ZVAL_VALUE works on uninit stack-based zvals) Index: ZendEngine2/zend_operators.c diff -u ZendEngine2/zend_operators.c:1.166 ZendEngine2/zend_operators.c:1.167 --- ZendEngine2/zend_operators.c:1.166 Sat Nov 8 09:06:07 2003
+++ ZendEngine2/zend_operators.c        Thu Nov 13 15:53:55 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
*/ -/* $Id: zend_operators.c,v 1.166 2003/11/08 14:06:07 helly Exp $ */ +/* $Id: zend_operators.c,v 1.167 2003/11/13 20:53:55 moriyoshi Exp $ */ #include <ctype.h> @@ -494,10 +494,7 @@
                case IS_OBJECT: {
                        TSRMLS_FETCH();
                        if (op->value.obj.handlers->cast_object) {
-                               zval tmp;
-                               if (op->value.obj.handlers->cast_object(op, &tmp, IS_STRING, 1 TSRMLS_CC) == SUCCESS && tmp.type == IS_STRING) {
-                                       zval_dtor(op);
-                                       *op = tmp;
+                               if (op->value.obj.handlers->cast_object(op, op, IS_STRING, 1 TSRMLS_CC) == SUCCESS) {
                                        break;
                                }
                                zend_error(E_NOTICE, "Object of class %s could not be converted to string", Z_OBJCE_P(op)->name);
-- Zend Engine CVS Mailing List (http://cvs.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


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