cvs: pecl /spl spl_engine.c spl_engine.h

From: Date: Wed, 10 Dec 2003 10:21:24 +0000
Subject: cvs: pecl /spl spl_engine.c spl_engine.h
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-577@lists.php.net to get a copy of this message
helly Wed Dec 10 05:21:24 2003 EDT Modified files: /pecl/spl spl_engine.c spl_engine.h Log: Make these inline Index: pecl/spl/spl_engine.c diff -u pecl/spl/spl_engine.c:1.17 pecl/spl/spl_engine.c:1.18 --- pecl/spl/spl_engine.c:1.17 Sun Nov 9 09:05:35 2003 +++ pecl/spl/spl_engine.c Wed Dec 10 05:21:24 2003 @@ -43,36 +43,6 @@ } /* }}} */ -/* {{{ spl_instantiate_arg_ex1 */ -int spl_instantiate_arg_ex1(zend_class_entry *pce, zval **retval, int alloc, zval *arg1 TSRMLS_DC) -{ - zval *tmp; - - spl_instantiate(pce, retval, alloc TSRMLS_CC); - - zend_call_method(retval, pce, &pce->constructor, pce->constructor->common.function_name, strlen(pce->constructor->common.function_name), &tmp, 1, arg1, NULL TSRMLS_CC); - if (tmp) { - zval_ptr_dtor(&tmp); - } - return 0; -} -/* }}} */ - -/* {{{ spl_instantiate_arg_ex2 */ -int spl_instantiate_arg_ex2(zend_class_entry *pce, zval **retval, int alloc, zval *arg1, zval *arg2 TSRMLS_DC) -{ - zval *tmp; - - spl_instantiate(pce, retval, alloc TSRMLS_CC); - - zend_call_method(retval, pce, &pce->constructor, pce->constructor->common.function_name, strlen(pce->constructor->common.function_name), &tmp, 2, arg1, arg2 TSRMLS_CC); - if (tmp) { - zval_ptr_dtor(&tmp); - } - return 0; -} -/* }}} */ - /* {{{ spl_is_instance_of */ int spl_is_instance_of(zval **obj, zend_class_entry *ce TSRMLS_DC) { Index: pecl/spl/spl_engine.h diff -u pecl/spl/spl_engine.h:1.15 pecl/spl/spl_engine.h:1.16 --- pecl/spl/spl_engine.h:1.15 Wed Nov 26 18:28:34 2003 +++ pecl/spl/spl_engine.h Wed Dec 10 05:21:24 2003 @@ -21,6 +21,7 @@ #include "php.h" #include "php_spl.h" +#include "zend_interfaces.h" /* {{{ zend_class_entry */ static inline zend_class_entry *spl_get_class_entry(zval *obj TSRMLS_DC) @@ -34,8 +35,26 @@ /* }}} */ void spl_instantiate(zend_class_entry *pce, zval **object, int alloc TSRMLS_DC); -int spl_instantiate_arg_ex1(zend_class_entry *pce, zval **retval, int alloc, zval *arg1 TSRMLS_DC); -int spl_instantiate_arg_ex2(zend_class_entry *pce, zval **retval, int alloc, zval *arg1, zval *arg2 TSRMLS_DC); + +/* {{{ spl_instantiate_arg_ex1 */ +static inline int spl_instantiate_arg_ex1(zend_class_entry *pce, zval **retval, int alloc, zval *arg1 TSRMLS_DC) +{ + spl_instantiate(pce, retval, alloc TSRMLS_CC); + + zend_call_method(retval, pce, &pce->constructor, pce->constructor->common.function_name, strlen(pce->constructor->common.function_name), NULL, 1, arg1, NULL TSRMLS_CC); + return 0; +} +/* }}} */ + +/* {{{ spl_instantiate_arg_ex2 */ +static inline int spl_instantiate_arg_ex2(zend_class_entry *pce, zval **retval, int alloc, zval *arg1, zval *arg2 TSRMLS_DC) +{ + spl_instantiate(pce, retval, alloc TSRMLS_CC); + + zend_call_method(retval, pce, &pce->constructor, pce->constructor->common.function_name, strlen(pce->constructor->common.function_name), NULL, 2, arg1, arg2 TSRMLS_CC); + return 0; +} +/* }}} */ int spl_is_instance_of(zval **obj, zend_class_entry *ce TSRMLS_DC);

« previous php.pecl.cvs (#577) next »