diff options
Diffstat (limited to 'ext/spl/spl_engine.h')
| -rw-r--r-- | ext/spl/spl_engine.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/ext/spl/spl_engine.h b/ext/spl/spl_engine.h index a621355ba4..8fa5539ba5 100644 --- a/ext/spl/spl_engine.h +++ b/ext/spl/spl_engine.h @@ -51,6 +51,36 @@ static inline int spl_instantiate_arg_ex2(zend_class_entry *pce, zval *retval, z } /* }}} */ +/* {{{ spl_instantiate_arg_n */ +static inline void spl_instantiate_arg_n(zend_class_entry *pce, zval *retval, int argc, zval *argv TSRMLS_DC) +{ + zend_function *func = pce->constructor; + zend_fcall_info fci; + zend_fcall_info_cache fcc; + zval dummy; + + spl_instantiate(pce, retval TSRMLS_CC); + + fci.size = sizeof(zend_fcall_info); + fci.function_table = &pce->function_table; + ZVAL_STR(&fci.function_name, func->common.function_name); + fci.object = Z_OBJ_P(retval); + fci.symbol_table = NULL; + fci.retval = &dummy; + fci.param_count = argc; + fci.params = argv; + fci.no_separation = 1; + + fcc.initialized = 1; + fcc.function_handler = func; + fcc.calling_scope = EG(scope); + fcc.called_scope = pce; + fcc.object = Z_OBJ_P(retval); + + zend_call_function(&fci, &fcc TSRMLS_CC); +} +/* }}} */ + #endif /* SPL_ENGINE_H */ /* |
