tree-wide: Replace ZEND_WRONG_PARAM_COUNT() by its definition#20066
tree-wide: Replace ZEND_WRONG_PARAM_COUNT() by its definition#20066TimWolla merged 6 commits intophp:masterfrom
ZEND_WRONG_PARAM_COUNT() by its definition#20066Conversation
This is a direct alias.
This macro was hiding control flow (the return statement) and thus was particularly unhygienic.
|
@Girgias I also considered improving the error messages, but I'm not really familiar with all the extensions and I also wanted to avoid combining the internal cleanup with a behavioral change. Especially when the API needs this function, it is not great in the first place, so I feel improving the error message is a little like polishing a turd. So I just did the mechanical change that allowed to clean up zend_API 😄 |
bwoebi
left a comment
There was a problem hiding this comment.
I don't think we should do that.
This macro is simple enough and properly abstracts what it does.
I don't mind a rename/alias to RETURN_WRONG_PARAM_COUNT(); or similar, if you want to indicate the control flow as part of the macro.
It feels odd that this specific exception-throwing function (which is already very rarely needed and will be needed even more rarely once Gina's PRs ship) is special-cased by having a macro that implies the return when all other exception-throwing functions don't. |
This macro was hiding control flow (the return statement) and thus was particularly unhygienic.