diff options
| author | Marcus Boerger <helly@php.net> | 2005-03-11 02:11:44 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2005-03-11 02:11:44 +0000 |
| commit | 5a94bb642f75c5f5bb96bcbfcfebf5f1eb185a5d (patch) | |
| tree | 6664d24dd226f892a0a7ea9903fcfbdc17b29a1a | |
| parent | 4e390892b728a30174c5b0b53a0679f9f3a721d7 (diff) | |
| download | php-git-5a94bb642f75c5f5bb96bcbfcfebf5f1eb185a5d.tar.gz | |
- Do not touch return_valu's refcount or is_ref
| -rw-r--r-- | ext/standard/type.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/ext/standard/type.c b/ext/standard/type.c index 3005df1dce..eeff11bc29 100644 --- a/ext/standard/type.c +++ b/ext/standard/type.c @@ -153,8 +153,7 @@ PHP_FUNCTION(intval) WRONG_PARAM_COUNT; } - *return_value = **num; - zval_copy_ctor(return_value); + RETVAL_ZVAL(*num, 1, 0); convert_to_long_base(return_value, base); } /* }}} */ @@ -169,8 +168,7 @@ PHP_FUNCTION(floatval) WRONG_PARAM_COUNT; } - *return_value = **num; - zval_copy_ctor(return_value); + RETVAL_ZVAL(*num, 1, 0); convert_to_double(return_value); } /* }}} */ @@ -179,7 +177,7 @@ PHP_FUNCTION(floatval) Get the string value of a variable */ PHP_FUNCTION(strval) { - pval **num; + pval **num, *tmp; zval expr_copy; int use_copy; @@ -187,16 +185,12 @@ PHP_FUNCTION(strval) WRONG_PARAM_COUNT; } - *return_value = **num; - - zend_make_printable_zval(return_value, &expr_copy, &use_copy); + zend_make_printable_zval(*num, &expr_copy, &use_copy); if (use_copy) { - *return_value = expr_copy; - INIT_PZVAL(return_value); - zval_copy_ctor(return_value); - zval_dtor(&expr_copy); + tmp = &expr_copy; + RETVAL_ZVAL(tmp, 0, 0); } else { - zval_copy_ctor(return_value); + RETVAL_ZVAL(*num, 0, 0); } } /* }}} */ |
