]> granicus.if.org Git - php/commitdiff
Reverted wrong fix for bug #30572.
authorDmitry Stogov <dmitry@php.net>
Tue, 31 May 2005 11:16:51 +0000 (11:16 +0000)
committerDmitry Stogov <dmitry@php.net>
Tue, 31 May 2005 11:16:51 +0000 (11:16 +0000)
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.

Zend/zend_operators.c

index 3f354597dcab4513390693791d5e608fdcbbd784..f6d6fdd801870e0f39d150b0a6cd4ad04c5b01cb 100644 (file)
@@ -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) {                                                                           \