Skip to content

Commit f2c4f06

Browse files
committed
Remove unnecessary uses of z/ parameters
1 parent 49a4e69 commit f2c4f06

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

ext/filter/filter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ PHP_FUNCTION(filter_var)
767767
zend_long filter = FILTER_DEFAULT;
768768
zval *filter_args = NULL, *data;
769769

770-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z/|lz", &data, &filter, &filter_args) == FAILURE) {
770+
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|lz", &data, &filter, &filter_args) == FAILURE) {
771771
return;
772772
}
773773

ext/gd/gd_ctx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
106106
}
107107
break;
108108
case PHP_GDIMG_TYPE_BMP:
109-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|z/!b", &imgind, &to_zval, &compressed) == FAILURE) {
109+
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|z!b", &imgind, &to_zval, &compressed) == FAILURE) {
110110
return;
111111
}
112112
break;
@@ -117,7 +117,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
117117
* PHP_GDIMG_TYPE_WBM
118118
* PHP_GDIMG_TYPE_WEBP
119119
* */
120-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|z/!ll", &imgind, &to_zval, &quality, &basefilter) == FAILURE) {
120+
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|z!ll", &imgind, &to_zval, &quality, &basefilter) == FAILURE) {
121121
return;
122122
}
123123
}

ext/pdo/pdo_stmt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,8 +1578,8 @@ static PHP_METHOD(PDOStatement, bindValue)
15781578
param.paramno = -1;
15791579

15801580
if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(),
1581-
"lz/|l", &param.paramno, &parameter, &param_type)) {
1582-
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "Sz/|l", &param.name,
1581+
"lz|l", &param.paramno, &parameter, &param_type)) {
1582+
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "Sz|l", &param.name,
15831583
&parameter, &param_type)) {
15841584
RETURN_FALSE;
15851585
}

ext/sqlite3/sqlite3.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,8 +1520,8 @@ PHP_METHOD(sqlite3stmt, bindValue)
15201520
param.param_number = -1;
15211521
param.type = SQLITE3_TEXT;
15221522

1523-
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "lz/|l", &param.param_number, &parameter, &param.type) == FAILURE) {
1524-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sz/|l", &param.name, &parameter, &param.type) == FAILURE) {
1523+
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "lz|l", &param.param_number, &parameter, &param.type) == FAILURE) {
1524+
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sz|l", &param.name, &parameter, &param.type) == FAILURE) {
15251525
return;
15261526
}
15271527
}

main/output.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,7 @@ PHP_FUNCTION(ob_start)
13091309
zend_long chunk_size = 0;
13101310
zend_long flags = PHP_OUTPUT_HANDLER_STDFLAGS;
13111311

1312-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|z/ll", &output_handler, &chunk_size, &flags) == FAILURE) {
1312+
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|zll", &output_handler, &chunk_size, &flags) == FAILURE) {
13131313
return;
13141314
}
13151315

0 commit comments

Comments
 (0)