From: Dmitry Stogov Date: Tue, 31 May 2005 11:16:51 +0000 (+0000) Subject: Reverted wrong fix for bug #30572. X-Git-Tag: php-5.0.1b1~126 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=747074f9888b5062feb3e0fa427d98fb67e657ce;p=php Reverted wrong fix for bug #30572. Seems the bug was already fixed in other way. But reverted patch produced a lot of valgrind errors, because IS_TMP_VAR operands don't initialize refcount. --- diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 3f354597dc..f6d6fdd801 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -145,7 +145,7 @@ ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC) } #define zendi_convert_scalar_to_number(op, holder, result) \ - if (op==result || op->refcount == 0) { \ + if (op==result) { \ if (op->type != IS_LONG) { \ convert_scalar_to_number(op TSRMLS_CC); \ } \ @@ -191,7 +191,7 @@ ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC) #define DVAL_TO_LVAL(d, l) (l) = (d) > LONG_MAX ? (unsigned long) (d) : (long) (d) #define zendi_convert_to_long(op, holder, result) \ - if (op == result || op->refcount == 0) { \ + if (op == result) { \ convert_to_long(op); \ } else if ((op)->type != IS_LONG) { \ switch ((op)->type) { \ @@ -227,7 +227,7 @@ ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC) #define zendi_convert_to_boolean(op, holder, result) \ - if (op==result || op->refcount == 0) { \ + if (op==result) { \ convert_to_boolean(op); \ } else if ((op)->type != IS_BOOL) { \ switch ((op)->type) { \