com php-src: Updated some str functions to new parameter API: Zend/zend_builtin_functions.c

From: Date: Wed, 07 Jun 2017 21:43:37 +0000
Subject: com php-src: Updated some str functions to new parameter API: Zend/zend_builtin_functions.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-98025@lists.php.net to get a copy of this message
Commit: 7cce220be8a220089b797cc88a9b84faaed6f063 Author: Richard Fussenegger <fleshgrinder@users.noreply.github.com> Wed, 7 Jun 2017 22:08:18 +0200 Committer: Nikita Popov <nikita.ppv@gmail.com> Wed, 7 Jun 2017 23:43:37 +0200 Parents: 595a395cb911a4ef54cbaf11cd0056d38316c87c Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7cce220be8a220089b797cc88a9b84faaed6f063 Log: Updated some str functions to new parameter API Changed paths: M Zend/zend_builtin_functions.c Diff: diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 000348d..960a1de 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -532,9 +532,10 @@ ZEND_FUNCTION(strcmp) { zend_string *s1, *s2; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS", &s1, &s2) == FAILURE) { - return; - } + ZEND_PARSE_PARAMETERS_START(2, 2) + Z_PARAM_STR(s1) + Z_PARAM_STR(s2) + ZEND_PARSE_PARAMETERS_END(); RETURN_LONG(zend_binary_strcmp(ZSTR_VAL(s1), ZSTR_LEN(s1), ZSTR_VAL(s2), ZSTR_LEN(s2))); } @@ -547,9 +548,11 @@ ZEND_FUNCTION(strncmp) zend_string *s1, *s2; zend_long len; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "SSl", &s1, &s2, &len) == FAILURE) { - return; - } + ZEND_PARSE_PARAMETERS_START(3, 3) + Z_PARAM_STR(s1) + Z_PARAM_STR(s2) + Z_PARAM_LONG(len) + ZEND_PARSE_PARAMETERS_END(); if (len < 0) { zend_error(E_WARNING, "Length must be greater than or equal to 0"); @@ -566,9 +569,10 @@ ZEND_FUNCTION(strcasecmp) { zend_string *s1, *s2; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS", &s1, &s2) == FAILURE) { - return; - } + ZEND_PARSE_PARAMETERS_START(2, 2) + Z_PARAM_STR(s1) + Z_PARAM_STR(s2) + ZEND_PARSE_PARAMETERS_END(); RETURN_LONG(zend_binary_strcasecmp(ZSTR_VAL(s1), ZSTR_LEN(s1), ZSTR_VAL(s2), ZSTR_LEN(s2))); } @@ -581,9 +585,11 @@ ZEND_FUNCTION(strncasecmp) zend_string *s1, *s2; zend_long len; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "SSl", &s1, &s2, &len) == FAILURE) { - return; - } + ZEND_PARSE_PARAMETERS_START(3, 3) + Z_PARAM_STR(s1) + Z_PARAM_STR(s2) + Z_PARAM_LONG(len) + ZEND_PARSE_PARAMETERS_END(); if (len < 0) { zend_error(E_WARNING, "Length must be greater than or equal to 0");

« previous php.cvs (#98025) next »