Skip to content

Commit df2749d

Browse files
committed
Tweak zend_test arginfo/zpp
1 parent 1d4e229 commit df2749d

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

ext/zend_test/test.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,12 @@ ZEND_FUNCTION(zend_test_func)
4545

4646
ZEND_FUNCTION(zend_test_array_return)
4747
{
48-
zval *arg1, *arg2;
49-
50-
zend_parse_parameters(ZEND_NUM_ARGS(), "|zz", &arg1, &arg2);
48+
ZEND_PARSE_PARAMETERS_NONE();
5149
}
5250

5351
ZEND_FUNCTION(zend_test_nullable_array_return)
5452
{
55-
zval *arg1, *arg2;
56-
57-
zend_parse_parameters(ZEND_NUM_ARGS(), "|zz", &arg1, &arg2);
53+
ZEND_PARSE_PARAMETERS_NONE();
5854
}
5955

6056
ZEND_FUNCTION(zend_test_void_return)

ext/zend_test/test.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function zend_test_nullable_array_return(): ?array {}
2020
function zend_test_void_return(): void {}
2121

2222
/** @deprecated */
23-
function zend_test_deprecated(): void {}
23+
function zend_test_deprecated($arg = UNKNOWN): void {}
2424

2525
function zend_create_unterminated_string(string $str): string {}
2626

ext/zend_test/test_arginfo.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: d04baf2ffeb73d2e48f806316407ec720ea6f176 */
2+
* Stub hash: d2f58424106d78e0bb3b363c34fa94472b5e758d */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_array_return, 0, 0, IS_ARRAY, 0)
55
ZEND_END_ARG_INFO()
@@ -10,7 +10,9 @@ ZEND_END_ARG_INFO()
1010
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_void_return, 0, 0, IS_VOID, 0)
1111
ZEND_END_ARG_INFO()
1212

13-
#define arginfo_zend_test_deprecated arginfo_zend_test_void_return
13+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_deprecated, 0, 0, IS_VOID, 0)
14+
ZEND_ARG_INFO(0, arg)
15+
ZEND_END_ARG_INFO()
1416

1517
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_create_unterminated_string, 0, 1, IS_STRING, 0)
1618
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)

0 commit comments

Comments
 (0)