Skip to content

Commit 9fc9151

Browse files
committed
Remove zend_fcall_info_argp()
This function reallocates the param zvals on the heap, when in general they can be directly assigned to the FCI
1 parent c97215a commit 9fc9151

File tree

3 files changed

+1
-21
lines changed

3 files changed

+1
-21
lines changed

UPGRADING.INTERNALS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ PHP 8.3 INTERNALS UPGRADE NOTES
2323
- zend_fcall_info_args_restore()
2424
- zend_fcall_info_argn()
2525
- zend_fcall_info_argv()
26+
- zend_fcall_info_argp()
2627

2728
========================
2829
2. Build system changes

Zend/zend_API.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4061,21 +4061,6 @@ ZEND_API zend_result zend_fcall_info_args(zend_fcall_info *fci, zval *args) /* {
40614061
}
40624062
/* }}} */
40634063

4064-
ZEND_API void zend_fcall_info_argp(zend_fcall_info *fci, uint32_t argc, zval *argv) /* {{{ */
4065-
{
4066-
zend_fcall_info_args_clear(fci, !argc);
4067-
4068-
if (argc) {
4069-
fci->param_count = argc;
4070-
fci->params = (zval *) erealloc(fci->params, fci->param_count * sizeof(zval));
4071-
4072-
for (uint32_t i = 0; i < argc; ++i) {
4073-
ZVAL_COPY(&fci->params[i], &argv[i]);
4074-
}
4075-
}
4076-
}
4077-
/* }}} */
4078-
40794064
ZEND_API const char *zend_get_module_version(const char *module_name) /* {{{ */
40804065
{
40814066
zend_string *lname;

Zend/zend_API.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -696,12 +696,6 @@ ZEND_API void zend_fcall_info_args_clear(zend_fcall_info *fci, bool free_mem);
696696
ZEND_API zend_result zend_fcall_info_args(zend_fcall_info *fci, zval *args);
697697
ZEND_API zend_result zend_fcall_info_args_ex(zend_fcall_info *fci, zend_function *func, zval *args);
698698

699-
/** Set arguments in the zend_fcall_info struct taking care of refcount.
700-
* If argc is 0 the arguments which are set will be cleared, else pass
701-
* a variable amount of zval** arguments.
702-
*/
703-
ZEND_API void zend_fcall_info_argp(zend_fcall_info *fci, uint32_t argc, zval *argv);
704-
705699
/* Can only return FAILURE if EG(active) is false during late engine shutdown.
706700
* If the call or call setup throws, EG(exception) will be set and the retval
707701
* will be UNDEF. Otherwise, the retval will be a non-UNDEF value. */

0 commit comments

Comments
 (0)