Re: cvs: php-src(PHP_5_3) /ext/standard string.c
| From: | Dmitry Stogov | Date: | Thu, 24 Jan 2008 12:43:53 +0000 |
| Subject: | Re: cvs: php-src(PHP_5_3) /ext/standard string.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-47962@lists.php.net to get a copy of this message | ||
Hi Ilia,
This patch was committed into PHP_5_3 only, and it breaks two tests.
Could you please revert it or fix test files and commit to HEAD.
ext/standard/tests/array/array_filter_variation9.phpt
ext/standard/tests/strings/chr_ord.phpt
Thanks. Dmitry.
Ilia Alshanetsky wrote:
iliaa Tue Jan 22 01:34:24 2008 UTCModified files: (Branch: PHP_5_3) /php-src/ext/standard string.c Log:use new param parsing API http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.69.2.11&r2=1.445.2.14.2.69.2.12&diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.445.2.14.2.69.2.11 php-src/ext/standard/string.c:1.445.2.14.2.69.2.12 --- php-src/ext/standard/string.c:1.445.2.14.2.69.2.11 Sat Jan 19 19:27:21 2008 +++ php-src/ext/standard/string.c Tue Jan 22 01:34:24 2008 @@ -18,7 +18,7 @@+----------------------------------------------------------------------+*/ -/* $Id: string.c,v 1.445.2.14.2.69.2.11 2008/01/19 19:27:21 davidc Exp $ */ +/* $Id: string.c,v 1.445.2.14.2.69.2.12 2008/01/22 01:34:24 iliaa Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -2601,18 +2601,16 @@Converts ASCII code to a character */PHP_FUNCTION(chr) { - zval **num; + long c; char temp[2]; - - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) { - WRONG_PARAM_COUNT; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &c) == FAILURE) { + return; } - convert_to_long_ex(num); - - temp[0] = (char) Z_LVAL_PP(num); - temp[1] = 0; + temp[0] = (char)c; + temp[1] = '\0'; - RETVAL_STRINGL(temp, 1, 1); + RETURN_STRINGL(temp, 1, 1); } /* }}} */