com php-src: Use FAST_ZPP in few more frequently us ed functions: Zend/zend_builtin_functions.c ext/s tandard/array.c ext/standard/string.c
ext/standard/type .c

From: Date: Mon, 12 Jan 2015 16:26:12 +0000
Subject: com php-src: Use FAST_ZPP in few more frequently us ed functions: Zend/zend_builtin_functions.c ext/s tandard/array.c ext/standard/string.c
ext/standard/type .c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-84071@lists.php.net to get a copy of this message
Commit: c5047d1f11318a8613155c886cdb089deb52c5fb Author: Dmitry Stogov <dmitry@zend.com> Mon, 12 Jan 2015 19:26:12 +0300 Parents: 5f68ffad71737b94b7d01277d605797de7afc66f Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c5047d1f11318a8613155c886cdb089deb52c5fb Log: Use FAST_ZPP in few more frequently used functions Changed paths: M Zend/zend_builtin_functions.c M ext/standard/array.c M ext/standard/string.c M ext/standard/type..c Diff: diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 9e3f529..6588c2d 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -670,9 +670,16 @@ ZEND_FUNCTION(error_reporting) zend_string *err; int old_error_reporting; +#ifndef FAST_ZPP if (zend_parse_parameters(ZEND_NUM_ARGS(), "|S", &err) == FAILURE) { return; } +#else + ZEND_PARSE_PARAMETERS_START(0, 1) + Z_PARAM_OPTIONAL + Z_PARAM_STR(err) + ZEND_PARSE_PARAMETERS_END(); +#endif old_error_reporting = EG(error_reporting); if(ZEND_NUM_ARGS() != 0) { diff --git a/ext/standard/array.c b/ext/standard/array.c index a85aa8b...f31015b 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -2788,9 +2788,15 @@ PHP_FUNCTION(array_values) zval *input, /* Input array */ *entry; /* An entry in the input array */ +#ifndef FAST_ZPP if (zend_parse_parameters(ZEND_NUM_ARGS(), "a", &input) == FAILURE) { return; } +#else + ZEND_PARSE_PARAMETERS_START(1, 1) + Z_PARAM_ARRAY(input) + ZEND_PARSE_PARAMETERS_END(); +#endif /* Initialize return array */ array_init_size(return_value, zend_hash_num_elements(Z_ARRVAL_P(input))); diff --git a/ext/standard/string.c b/ext/standard/string.c index 135008f..c377cae 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1406,9 +1406,15 @@ PHP_FUNCTION(strtoupper) { zend_string *arg; +#ifndef FAST_ZPP if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &arg) == FAILURE) { return; } +#else + ZEND_PARSE_PARAMETERS_START(1, 1) + Z_PARAM_STR(arg) + ZEND_PARSE_PARAMETERS_END(); +#endif RETURN_STR(php_string_toupper(arg)); } diff --git a/ext/standard/type.c b/ext/standard/type.c index a260c43..d70672e 100644 --- a/ext/standard/type.c +++ b/ext/standard/type.c @@ -194,9 +194,16 @@ PHP_FUNCTION(boolval) PHP_FUNCTION(strval) { zval *num; + +#ifndef FAST_ZPP if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &num) == FAILURE) { return; } +#else + ZEND_PARSE_PARAMETERS_START(1, 1) + Z_PARAM_ZVAL(num) + ZEND_PARSE_PARAMETERS_END(); +#endif RETVAL_STR(zval_get_string(num)); } @@ -322,9 +329,15 @@ PHP_FUNCTION(is_numeric) { zval *arg; +#ifndef FAST_ZPP if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &arg) == FAILURE) { return; } +#else + ZEND_PARSE_PARAMETERS_START(1, 1) + Z_PARAM_ZVAL(arg) + ZEND_PARSE_PARAMETERS_END(); +#endif switch (Z_TYPE_P(arg)) { case IS_LONG:

« previous php.cvs (#84071) next »