mirror of
https://github.com/php/frankenphp.git
synced 2026-03-24 00:52:11 +01:00
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:
committed by
GitHub
parent
0b470ab27c
commit
1bfa3db096
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user