summaryrefslogtreecommitdiff
path: root/ext/tokenizer/tokenizer.c
diff options
context:
space:
mode:
authorSara Golemon <pollita@php.net>2016-12-31 08:56:15 -0800
committerSara Golemon <pollita@php.net>2016-12-31 09:01:20 -0800
commit8bbfe174a8029256fdb252d08ba641b6662b4fbc (patch)
tree10d9554cda4662f54430e438bd83515a65a943a2 /ext/tokenizer/tokenizer.c
parentbf422c56ab88a81695d8913b1d2f58d62f40986a (diff)
downloadphp-git-8bbfe174a8029256fdb252d08ba641b6662b4fbc.tar.gz
Use new param API in tokenizer
Diffstat (limited to 'ext/tokenizer/tokenizer.c')
-rw-r--r--ext/tokenizer/tokenizer.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c
index 9537e91251..11c82654b4 100644
--- a/ext/tokenizer/tokenizer.c
+++ b/ext/tokenizer/tokenizer.c
@@ -275,9 +275,11 @@ PHP_FUNCTION(token_get_all)
zend_long flags = 0;
zend_bool success;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|l", &source, &flags) == FAILURE) {
- return;
- }
+ ZEND_PARSE_PARAMETERS_START(1, 2)
+ Z_PARAM_STR(source)
+ Z_PARAM_OPTIONAL
+ Z_PARAM_LONG(flags)
+ ZEND_PARSE_PARAMETERS_END();
if (flags & TOKEN_PARSE) {
success = tokenize_parse(return_value, source);
@@ -297,9 +299,9 @@ PHP_FUNCTION(token_name)
{
zend_long type;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &type) == FAILURE) {
- return;
- }
+ ZEND_PARSE_PARAMETERS_START(1, 1)
+ Z_PARAM_LONG(type)
+ ZEND_PARSE_PARAMETERS_END();
RETVAL_STRING(get_token_type_name(type));
}