1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00

Use new param API in tokenizer

This commit is contained in:
Sara Golemon
2016-12-31 08:56:15 -08:00
parent bf422c56ab
commit 8bbfe174a8

View File

@@ -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));
}