Skip to content

Commit 1afe89f

Browse files
Girgiaskrakjoe
authored andcommitted
Remove (ZEND_)WRONG_PARAM_COUNT_WITH_RETVAL macros
A TypeError is always emitted therefore assigning a retval is pointless and incorrect.
1 parent fda0ebf commit 1afe89f

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

UPGRADING.INTERNALS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ PHP 8.2 INTERNALS UPGRADE NOTES
1414
around zend_binary_str(n)casecmp_l() -- rather than
1515
zend_binary_str(n)casecmp() as one would expect. Call the appropriate
1616
wrapped function directly instead.
17+
* Removed the (ZEND_)WRONG_PARAM_COUNT_WITH_RETVAL() macros.
1718

1819
========================
1920
2. Build system changes

Zend/zend_API.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,10 +472,8 @@ ZEND_API const char *zend_get_type_by_const(int type);
472472
#define ZEND_IS_METHOD_CALL() (EX(func)->common.scope != NULL)
473473

474474
#define WRONG_PARAM_COUNT ZEND_WRONG_PARAM_COUNT()
475-
#define WRONG_PARAM_COUNT_WITH_RETVAL(ret) ZEND_WRONG_PARAM_COUNT_WITH_RETVAL(ret)
476475
#define ZEND_NUM_ARGS() EX_NUM_ARGS()
477476
#define ZEND_WRONG_PARAM_COUNT() { zend_wrong_param_count(); return; }
478-
#define ZEND_WRONG_PARAM_COUNT_WITH_RETVAL(ret) { zend_wrong_param_count(); return ret; }
479477

480478
#ifndef ZEND_WIN32
481479
#define DLEXPORT

0 commit comments

Comments
 (0)