Skip to content

Commit 409630e

Browse files
committed
Convert zpp to ZEND_PARSE_PARAMETERS for rdp_simplify
1 parent d3f3ab0 commit 409630e

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

geospatial.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -978,13 +978,10 @@ PHP_FUNCTION(rdp_simplify)
978978
int i;
979979
zval *pair;
980980

981-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zd", &points_array, &epsilon) == FAILURE) {
982-
return;
983-
}
984-
985-
if (Z_TYPE_P(points_array) != IS_ARRAY) {
986-
return;
987-
}
981+
ZEND_PARSE_PARAMETERS_START(2, 2)
982+
Z_PARAM_ARRAY(points_array)
983+
Z_PARAM_DOUBLE(epsilon)
984+
ZEND_PARSE_PARAMETERS_END();
988985

989986
array_init(return_value);
990987

0 commit comments

Comments
 (0)