From f2c4f06f84fd3a9fbb241dd84179eaa591f196a4 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 25 Jun 2018 19:00:37 +0200 Subject: [PATCH] Remove unnecessary uses of z/ parameters --- ext/filter/filter.c | 2 +- ext/gd/gd_ctx.c | 4 ++-- ext/pdo/pdo_stmt.c | 4 ++-- ext/sqlite3/sqlite3.c | 4 ++-- main/output.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ext/filter/filter.c b/ext/filter/filter.c index d7eab36bb6..56c93199f0 100644 --- a/ext/filter/filter.c +++ b/ext/filter/filter.c @@ -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; } diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c index cd63fead65..9c3d73335c 100644 --- a/ext/gd/gd_ctx.c +++ b/ext/gd/gd_ctx.c @@ -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; } } diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 94bb02d4b0..fbd2b12de4 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -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", ¶m.paramno, ¶meter, ¶m_type)) { - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "Sz/|l", ¶m.name, + "lz|l", ¶m.paramno, ¶meter, ¶m_type)) { + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "Sz|l", ¶m.name, ¶meter, ¶m_type)) { RETURN_FALSE; } diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index 2a3ec854ed..1924b4fc2b 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -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", ¶m.param_number, ¶meter, ¶m.type) == FAILURE) { - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sz/|l", ¶m.name, ¶meter, ¶m.type) == FAILURE) { + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "lz|l", ¶m.param_number, ¶meter, ¶m.type) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sz|l", ¶m.name, ¶meter, ¶m.type) == FAILURE) { return; } } diff --git a/main/output.c b/main/output.c index 048814e0b9..8518aa7c16 100644 --- a/main/output.c +++ b/main/output.c @@ -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; } -- 2.40.0