Skip to content

Commit 417ccb0

Browse files
committed
Remove zend_fcall_info_argn() and zend_fcall_info_argv()
Usage of these function heap allocates the zvals when they can already be used directly with an FCI
1 parent 3d299d4 commit 417ccb0

File tree

2 files changed

+0
-39
lines changed

2 files changed

+0
-39
lines changed

Zend/zend_API.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4190,33 +4190,6 @@ ZEND_API void zend_fcall_info_argp(zend_fcall_info *fci, uint32_t argc, zval *ar
41904190
}
41914191
/* }}} */
41924192

4193-
ZEND_API void zend_fcall_info_argv(zend_fcall_info *fci, uint32_t argc, va_list *argv) /* {{{ */
4194-
{
4195-
zend_fcall_info_args_clear(fci, !argc);
4196-
4197-
if (argc) {
4198-
zval *arg;
4199-
fci->param_count = argc;
4200-
fci->params = (zval *) erealloc(fci->params, fci->param_count * sizeof(zval));
4201-
4202-
for (uint32_t i = 0; i < argc; ++i) {
4203-
arg = va_arg(*argv, zval *);
4204-
ZVAL_COPY(&fci->params[i], arg);
4205-
}
4206-
}
4207-
}
4208-
/* }}} */
4209-
4210-
ZEND_API void zend_fcall_info_argn(zend_fcall_info *fci, uint32_t argc, ...) /* {{{ */
4211-
{
4212-
va_list argv;
4213-
4214-
va_start(argv, argc);
4215-
zend_fcall_info_argv(fci, argc, &argv);
4216-
va_end(argv);
4217-
}
4218-
/* }}} */
4219-
42204193
ZEND_API void zend_get_callable_zval_from_fcc(const zend_fcall_info_cache *fcc, zval *callable)
42214194
{
42224195
if (fcc->closure) {

Zend/zend_API.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -713,18 +713,6 @@ ZEND_API zend_result zend_fcall_info_args_ex(zend_fcall_info *fci, zend_function
713713
*/
714714
ZEND_API void zend_fcall_info_argp(zend_fcall_info *fci, uint32_t argc, zval *argv);
715715

716-
/** Set arguments in the zend_fcall_info struct taking care of refcount.
717-
* If argc is 0 the arguments which are set will be cleared, else pass
718-
* a variable amount of zval** arguments.
719-
*/
720-
ZEND_API void zend_fcall_info_argv(zend_fcall_info *fci, uint32_t argc, va_list *argv);
721-
722-
/** Set arguments in the zend_fcall_info struct taking care of refcount.
723-
* If argc is 0 the arguments which are set will be cleared, else pass
724-
* a variable amount of zval** arguments.
725-
*/
726-
ZEND_API void zend_fcall_info_argn(zend_fcall_info *fci, uint32_t argc, ...);
727-
728716
/* Zend FCC API to store and handle PHP userland functions */
729717
static zend_always_inline bool zend_fcc_equals(const zend_fcall_info_cache* a, const zend_fcall_info_cache* b)
730718
{

0 commit comments

Comments
 (0)