]> granicus.if.org Git - php/commitdiff
Remove unnecessary uses of z/ parameters
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 25 Jun 2018 17:00:37 +0000 (19:00 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 25 Jun 2018 20:27:42 +0000 (22:27 +0200)
ext/filter/filter.c
ext/gd/gd_ctx.c
ext/pdo/pdo_stmt.c
ext/sqlite3/sqlite3.c
main/output.c

index d7eab36bb630c9b9ef0f4d0aea00790d4034bd94..56c93199f0bf4f713eeb81c0dfddb910b02b9618 100644 (file)
@@ -767,7 +767,7 @@ PHP_FUNCTION(filter_var)
        zend_long filter = FILTER_DEFAULT;
        zval *filter_args = NULL, *data;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS(), "z/|lz", &data, &filter, &filter_args) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|lz", &data, &filter, &filter_args) == FAILURE) {
                return;
        }
 
index cd63fead659e31b8390b94449ad6f40c2dc53dc0..9c3d73335c293484554ae834709d38422554932a 100644 (file)
@@ -106,7 +106,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
                        }
                        break;
                case PHP_GDIMG_TYPE_BMP:
-                       if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|z/!b", &imgind, &to_zval, &compressed) == FAILURE) {
+                       if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|z!b", &imgind, &to_zval, &compressed) == FAILURE) {
                                return;
                        }
                        break;
@@ -117,7 +117,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
                         * PHP_GDIMG_TYPE_WBM
                         * PHP_GDIMG_TYPE_WEBP
                         * */
-                       if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|z/!ll", &imgind, &to_zval, &quality, &basefilter) == FAILURE) {
+                       if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|z!ll", &imgind, &to_zval, &quality, &basefilter) == FAILURE) {
                                return;
                        }
        }
index 94bb02d4b0ac41aec72461d40d3ca5d243ff6a02..fbd2b12de493c0fc4a106d83f6e51840de59a5c5 100644 (file)
@@ -1578,8 +1578,8 @@ static PHP_METHOD(PDOStatement, bindValue)
        param.paramno = -1;
 
        if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(),
-                       "lz/|l", &param.paramno, &parameter, &param_type)) {
-               if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "Sz/|l", &param.name,
+                       "lz|l", &param.paramno, &parameter, &param_type)) {
+               if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "Sz|l", &param.name,
                                &parameter, &param_type)) {
                        RETURN_FALSE;
                }
index 2a3ec854ed1059f0ced098e2cf3e09ef8ebbf91d..1924b4fc2bb75e50ade6eeec527e358d776d8e83 100644 (file)
@@ -1520,8 +1520,8 @@ PHP_METHOD(sqlite3stmt, bindValue)
        param.param_number = -1;
        param.type = SQLITE3_TEXT;
 
-       if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "lz/|l", &param.param_number, &parameter, &param.type) == FAILURE) {
-               if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sz/|l", &param.name, &parameter, &param.type) == FAILURE) {
+       if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "lz|l", &param.param_number, &parameter, &param.type) == FAILURE) {
+               if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sz|l", &param.name, &parameter, &param.type) == FAILURE) {
                        return;
                }
        }
index 048814e0b991c0b813e220a164970cdf36ea173c..8518aa7c162830f78d2957d6f3c4b82892db97d5 100644 (file)
@@ -1309,7 +1309,7 @@ PHP_FUNCTION(ob_start)
        zend_long chunk_size = 0;
        zend_long flags = PHP_OUTPUT_HANDLER_STDFLAGS;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS(), "|z/ll", &output_handler, &chunk_size, &flags) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS(), "|zll", &output_handler, &chunk_size, &flags) == FAILURE) {
                return;
        }