diff options
author | Zeev Suraski <zeev@php.net> | 1999-09-03 15:22:04 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 1999-09-03 15:22:04 +0000 |
commit | 18d11eea4060f62f438bffc6042eaf1c5634590c (patch) | |
tree | 8bc9f8b126042cba50cd23a8f2e2bd1a4319abd5 /Zend/zend_operators.c | |
parent | 94bc5f6c55f66d49e3cf6d475149800a7fa941de (diff) | |
download | php-git-18d11eea4060f62f438bffc6042eaf1c5634590c.tar.gz |
Revert the IS_RESOURCE patch. It had some unintended behavior.
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r-- | Zend/zend_operators.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 3735692844..838cc91919 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -60,10 +60,7 @@ ZEND_API void convert_scalar_to_number(zval *op) break; } STR_FREE(strval); - } else if (op->type == IS_BOOL) { - op->type = IS_LONG; - } else if (op->type==IS_RESOURCE) { - zend_list_delete(op->value.lval); + } else if (op->type==IS_BOOL || op->type==IS_RESOURCE) { op->type = IS_LONG; } } @@ -85,13 +82,8 @@ ZEND_API void convert_scalar_to_number(zval *op) break; \ } \ (op) = &(holder); \ - } else if ((op)->type==IS_BOOL) { \ - (holder) = *(op); \ - (holder).type = IS_LONG; \ - (op) = &(holder); \ - } else if ((op)->type==IS_RESOURCE) { \ + } else if ((op)->type==IS_BOOL || (op)->type==IS_RESOURCE) { \ (holder) = *(op); \ - zend_list_delete((holder).value.lval); \ (holder).type = IS_LONG; \ (op) = &(holder); \ } @@ -104,8 +96,6 @@ ZEND_API void convert_scalar_to_number(zval *op) } else if ((op)->type != IS_LONG) { \ switch ((op)->type) { \ case IS_RESOURCE: \ - zend_list_delete((op)->value.lval); \ - /* break missing intentionally */ \ case IS_BOOL: \ break; \ case IS_DOUBLE: \ @@ -136,8 +126,6 @@ ZEND_API void convert_scalar_to_number(zval *op) } else if ((op)->type != IS_BOOL) { \ switch ((op)->type) { \ case IS_RESOURCE: \ - zend_list_delete((op)->value.lval); \ - /* break missing intentionally */ \ case IS_LONG: \ (holder).value.lval = ((op)->value.lval ? 1 : 0); \ break; \ @@ -180,8 +168,6 @@ ZEND_API void convert_to_long_base(zval *op, int base) switch (op->type) { case IS_RESOURCE: - zend_list_delete(op->value.lval); - /* break missing intentionally */ case IS_BOOL: case IS_LONG: break; @@ -221,8 +207,6 @@ ZEND_API void convert_to_double(zval *op) switch (op->type) { case IS_RESOURCE: - zend_list_delete(op->value.lval); - /* break missing intentionally */ case IS_BOOL: case IS_LONG: op->value.dval = (double) op->value.lval; @@ -268,8 +252,6 @@ ZEND_API void convert_to_boolean(zval *op) case IS_BOOL: break; case IS_RESOURCE: - zend_list_delete(op->value.lval); - /* break missing intentionally */ case IS_LONG: op->value.lval = (op->value.lval ? 1 : 0); break; |