Another question about storing zend_fcall_info and zend_fcall_info_cache
| From: | Ruslan Osmanov | Date: | Tue, 30 Jul 2013 10:24:38 +0000 |
| Subject: | Another question about storing zend_fcall_info and zend_fcall_info_cache | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-10921@lists.php.net to get a copy of this message | ||
Hi,
let's suppose we've a method accepting a "callable" argument. The callable
should be stored in some internal structure. I'm asking for help with the
refcounts inside zend_fcall_info. Most of time we have to increment
refcount of object_ptr memeber. But sometimes not. I'll explain.
The recommended way to accept a callable is using the "f" option of
zend_parse_arguments, e.g.:
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f", &fci, &fcc) ==
FAILURE) {
return;
}
--
Regards