cvs: php-src /ext/standard type.c

From: Date: Fri, 11 Mar 2005 02:11:47 +0000
Subject: cvs: php-src /ext/standard type.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-30860@lists.php.net to get a copy of this message
helly Thu Mar 10 21:11:47 2005 EDT Modified files: /php-src/ext/standard type.c Log: - Do not touch return_valu's refcount or is_ref http://cvs.php.net/diff.php/php-src/ext/standard/type.c?r1=1.25&r2=1.26&ty=u Index: php-src/ext/standard/type.c diff -u php-src/ext/standard/type.c:1.25 php-src/ext/standard/type.c:1.26 --- php-src/ext/standard/type.c:1.25 Thu Apr 1 03:54:44 2004 +++ php-src/ext/standard/type.c Thu Mar 10 21:11:44 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: type.c,v 1.25 2004/04/01 08:54:44 derick Exp $ */ +/* $Id: type.c,v 1.26 2005/03/11 02:11:44 helly Exp $ */ #include "php.h" #include "php_incomplete_class.h" @@ -153,8 +153,7 @@ 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 @@ 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 @@ 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 @@ 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); } } /* }}} */

« previous php.cvs (#30860) next »