diff options
author | Marcus Boerger <helly@php.net> | 2003-06-17 20:18:10 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2003-06-17 20:18:10 +0000 |
commit | 5b3fd9bf2fb49ba9390065dc34ca0359d405c657 (patch) | |
tree | da09dea42c5b39d7a11b0bd16c0d0a24d11b1872 /ext/spl/spl_engine.h | |
parent | 897e6a4069b14d2c8afbf10aa167f2ee58e7e13b (diff) | |
download | php-git-5b3fd9bf2fb49ba9390065dc34ca0359d405c657.tar.gz |
- Remove namespace leftovers
- Convert some static inline functions to macros
- Faster was of function call parameter stack building
Diffstat (limited to 'ext/spl/spl_engine.h')
-rwxr-xr-x | ext/spl/spl_engine.h | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/ext/spl/spl_engine.h b/ext/spl/spl_engine.h index 831153e31b..e20ea39bb6 100755 --- a/ext/spl/spl_engine.h +++ b/ext/spl/spl_engine.h @@ -63,40 +63,27 @@ static inline int spl_begin_method_call_arg(zval **ce, zend_class_entry *obj_ce, } /* }}} */ -/* {{{ spl_begin_method_call_this */ -static inline int spl_begin_method_call_this(zval **ce, zend_class_entry *obj_ce, zend_function **fn_proxy, char *function_name, int fname_len, zval *retval TSRMLS_DC) +/* {{{ spl_begin_method_call_no_retval */ +static inline int spl_begin_method_call_no_retval(zval **ce, zend_class_entry *obj_ce, zend_function **fn_proxy, char *function_name, int fname_len TSRMLS_DC) { - zval *local_retval; - int ret = spl_call_method(ce, obj_ce, fn_proxy, function_name, fname_len, &local_retval, NULL TSRMLS_CC, 0); - if (local_retval) { - COPY_PZVAL_TO_ZVAL(*retval, local_retval); - } else { - INIT_ZVAL(*retval); + zval *retval; + int ret = spl_call_method(ce, obj_ce, fn_proxy, function_name, fname_len, &retval, NULL TSRMLS_CC, 0); + if (retval) { + zval_dtor(retval); + FREE_ZVAL(retval); } return ret; } /* }}} */ -/* {{{ spl_begin_method_call_ex */ -static inline int spl_begin_method_call_ex(zval **ce, zend_class_entry *obj_ce, zend_function **fn_proxy, char *function_name, int fname_len, zval **retval TSRMLS_DC) -{ - return spl_call_method(ce, obj_ce, fn_proxy, function_name, fname_len, retval, NULL TSRMLS_CC, 0); -} -/* }}} */ +#define spl_begin_method_call_ex(ce, obj_ce, fn_proxy, function_name, fname_len, retval) \ + spl_call_method(ce, obj_ce, fn_proxy, function_name, fname_len, retval, NULL TSRMLS_CC, 0) -/* {{{ spl_begin_method_call_arg_ex1 */ -static inline int spl_begin_method_call_arg_ex1(zval **ce, zend_class_entry *obj_ce, zend_function **fn_proxy, char *function_name, int fname_len, zval **retval, zval *arg1 TSRMLS_DC) -{ - return spl_call_method(ce, obj_ce, fn_proxy, function_name, fname_len, retval, NULL TSRMLS_CC, 1, arg1); -} -/* }}} */ +#define spl_begin_method_call_arg_ex1(ce, obj_ce, fn_proxy, function_name, fname_len, retval, arg1) \ + spl_call_method(ce, obj_ce, fn_proxy, function_name, fname_len, retval, NULL TSRMLS_CC, 1, arg1) -/* {{{ spl_begin_method_call_arg_ex2 */ -static inline int spl_begin_method_call_arg_ex2(zval **ce, zend_class_entry *obj_ce, zend_function **fn_proxy, char *function_name, int fname_len, zval **retval, zval *arg1, zval *arg2 TSRMLS_DC) -{ - return spl_call_method(ce, obj_ce, fn_proxy, function_name, fname_len, retval, NULL TSRMLS_CC, 2, arg1, arg2); -} -/* }}} */ +#define spl_begin_method_call_arg_ex2(ce, obj_ce, fn_proxy, function_name, fname_len, retval, arg1, arg2) \ + spl_call_method(ce, obj_ce, fn_proxy, function_name, fname_len, retval, NULL TSRMLS_CC, 2, arg1, arg2) void spl_instanciate(zend_class_entry *pce, zval **object TSRMLS_DC); int spl_instanciate_arg_ex2(zend_class_entry *pce, zval **retval, zval *arg1, zval *arg2, HashTable *symbol_table TSRMLS_DC); |