# zend_fcall_info API

- Thread: https://externals.io/message/25915
- Original archive: https://news-web.php.net/php.internals/25915
- Started by Michael Wallner on 2006-10-03T08:46:10+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #25915 — Michael Wallner — 2006-10-03T08:46:10+00:00

URL: https://externals.io/message/25915#25915

Hi,

I'd like to see zend_fcall_info_init() signature extended with an additional 'zval *callable_name' argument.
Additionally it seems that a vararg version of the zend_fcall_info_args() function would be valuable too:

int zend_fcall_info_argv(zend_fcall_info *fci TSRMLS_DC, int argc, ...)
{
	int          i;
	zval         *arg;
	va_list      argv;

	if (fci->params) {
		while (fci->param_count) {
			zval_ptr_dtor(fci->params[--fci->param_count]);
		}
		efree(fci->params);
	}
	fci->params = (zval***)safe_emalloc(sizeof(zval**), argc, 0);
	fci->param_count = argc;

	va_start(argv, argc);
	for (i = 0; i < argc; ++i) {
		arg = va_arg(argv, zval *);
		ZVAL_ADDREF(arg);
		fci->params[i] = &arg;
	}
	va_end(argv);
	return SUCCESS;
}

-- 
Michael

---

## #25929 — Michael Wallner — 2006-10-04T08:42:08+00:00

URL: https://externals.io/message/25915#25929 · In reply to: #25915

Michael Wallner wrote:
> Hi,
> 
> I'd like to see zend_fcall_info_init() signature extended with an additional 'zval *callable_name' argument.
> Additionally it seems that a vararg version of the zend_fcall_info_args() function would be valuable too:

Please see attached patch.

Regards,
-- 
Michael

---

## #26075 — Marcus Boerger — 2006-10-17T20:03:30+00:00

URL: https://externals.io/message/25915#26075 · In reply to: #25929

Hello Michael,

  looks nice to me. Only question i have is why not mark the new funcs ZEND_API?
Is that following the development we went through with the stuff when i proposed
it up to when it got comitted?

best regards
marcus

Wednesday, October 4, 2006, 10:42:08 AM, you wrote:

> Michael Wallner wrote:
> > […]

> Please see attached patch.

> Regards,



Best regards,
 Marcus

---

## #26076 — Michael Wallner — 2006-10-17T20:45:16+00:00

URL: https://externals.io/message/25915#26076 · In reply to: #26075

Marcus Boerger wrote:
> Hello Michael,
> 
>   looks nice to me. Only question i have is why not mark the new funcs ZEND_API?

Well, right. I could at least make use of zend_fcall_info_args_clear() in output.c.

> Is that following the development we went through with the stuff when i proposed
> it up to when it got comitted?

Pardon? :)

Regards,
-- 
Michael
