Skip to content

Commit 2157d2d

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 43079d5 commit 2157d2d

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

Zend/zend_API.c

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

4178-
ZEND_API void zend_fcall_info_argp(zend_fcall_info *fci, uint32_t argc, zval *argv) /* {{{ */
4179-
{
4180-
zend_fcall_info_args_clear(fci, !argc);
4181-
4182-
if (argc) {
4183-
fci->param_count = argc;
4184-
fci->params = (zval *) erealloc(fci->params, fci->param_count * sizeof(zval));
4185-
4186-
for (uint32_t i = 0; i < argc; ++i) {
4187-
ZVAL_COPY(&fci->params[i], &argv[i]);
4188-
}
4189-
}
4190-
}
4191-
/* }}} */
4192-
41934178
ZEND_API void zend_get_callable_zval_from_fcc(const zend_fcall_info_cache *fcc, zval *callable)
41944179
{
41954180
if (fcc->closure) {

Zend/zend_API.h

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

710-
/** Set arguments in the zend_fcall_info struct taking care of refcount.
711-
* If argc is 0 the arguments which are set will be cleared, else pass
712-
* a variable amount of zval** arguments.
713-
*/
714-
ZEND_API void zend_fcall_info_argp(zend_fcall_info *fci, uint32_t argc, zval *argv);
715-
716710
/* Zend FCC API to store and handle PHP userland functions */
717711
static zend_always_inline bool zend_fcc_equals(const zend_fcall_info_cache* a, const zend_fcall_info_cache* b)
718712
{

0 commit comments

Comments
 (0)