iliaa Thu Jan 8 00:37:39 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/ereg ereg.c Log: Simplify parameter parsing http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/ereg.c?r1=1.90.2.11&r2=1.90.2.12&diff_format=u Index: php-src/ext/ereg/ereg.c diff -u php-src/ext/ereg/ereg.c:1.90.2.11 php-src/ext/ereg/ereg.c:1.90.2.12 --- php-src/ext/ereg/ereg.c:1.90.2.11 Wed Dec 31 11:15:36 2008 +++ php-src/ext/ereg/ereg.c Thu Jan 8 00:37:39 2009 @@ -17,7 +17,7 @@ | Jaakko Hyvätti <jaa...@hyvatti.iki.fi> | +----------------------------------------------------------------------+ */ -/* $Id: ereg.c,v 1.90.2.11 2008/12/31 11:15:36 sebastian Exp $ */ +/* $Id: ereg.c,v 1.90.2.12 2009/01/08 00:37:39 iliaa Exp $ */ #include <stdio.h> #include <ctype.h> @@ -578,22 +578,17 @@ */ static void php_split(INTERNAL_FUNCTION_PARAMETERS, int icase) { - long arg_count; + long count = -1; regex_t re; regmatch_t subs[1]; char *spliton, *str, *strp, *endp; int spliton_len, str_len; - int err, size, count = -1, copts = 0; - int argc = ZEND_NUM_ARGS(); + int err, size, copts = 0; - if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &spliton, &spliton_len, &str, &str_len, &arg_count) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &spliton, &spliton_len, &str, &str_len, &count) == FAILURE) { return; } - if (argc > 2) { - count = arg_count; - } - if (icase) { copts = REG_ICASE; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php