fix(extgen): use fast ZPP (#2088)

Fast ZPP is being more and more widely used in php-src with PR such as
https://github.com/php/php-src/pull/20441 or
https://github.com/php/php-src/pull/20644, let's use it here as well.
This commit is contained in:
Alexandre Daubois
2026-01-14 15:20:54 +01:00
committed by GitHub
parent 0b470ab27c
commit 1bfa3db096
2 changed files with 2 additions and 6 deletions

View File

@@ -88,9 +88,7 @@ func (pp *ParameterParser) getDefaultValue(param phpParameter, fallback string)
func (pp *ParameterParser) generateParamParsing(params []phpParameter, requiredCount int) string {
if len(params) == 0 {
return ` if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}`
return ` ZEND_PARSE_PARAMETERS_NONE();`
}
var builder strings.Builder

View File

@@ -223,9 +223,7 @@ func TestParameterParser_GenerateParamParsing(t *testing.T) {
name: "no parameters",
params: []phpParameter{},
requiredCount: 0,
expected: ` if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}`,
expected: ` ZEND_PARSE_PARAMETERS_NONE();`,
},
{
name: "single required string parameter",