Back to index

php5  5.3.10
spl_engine.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Authors: Marcus Boerger <helly@php.net>                              |
00016    +----------------------------------------------------------------------+
00017  */
00018 
00019 /* $Id: spl_engine.h 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #ifndef SPL_ENGINE_H
00022 #define SPL_ENGINE_H
00023 
00024 #include "php.h"
00025 #include "php_spl.h"
00026 #include "zend_interfaces.h"
00027 
00028 PHPAPI void spl_instantiate(zend_class_entry *pce, zval **object, int alloc TSRMLS_DC);
00029 
00030 PHPAPI long spl_offset_convert_to_long(zval *offset TSRMLS_DC);
00031 
00032 /* {{{ spl_instantiate_arg_ex1 */
00033 static inline int spl_instantiate_arg_ex1(zend_class_entry *pce, zval **retval, int alloc, zval *arg1 TSRMLS_DC)
00034 {
00035        spl_instantiate(pce, retval, alloc TSRMLS_CC);
00036        
00037        zend_call_method(retval, pce, &pce->constructor, pce->constructor->common.function_name, strlen(pce->constructor->common.function_name), NULL, 1, arg1, NULL TSRMLS_CC);
00038        return 0;
00039 }
00040 /* }}} */
00041 
00042 /* {{{ spl_instantiate_arg_ex2 */
00043 static inline int spl_instantiate_arg_ex2(zend_class_entry *pce, zval **retval, int alloc, zval *arg1, zval *arg2 TSRMLS_DC)
00044 {
00045        spl_instantiate(pce, retval, alloc TSRMLS_CC);
00046        
00047        zend_call_method(retval, pce, &pce->constructor, pce->constructor->common.function_name, strlen(pce->constructor->common.function_name), NULL, 2, arg1, arg2 TSRMLS_CC);
00048        return 0;
00049 }
00050 /* }}} */
00051 
00052 #endif /* SPL_ENGINE_H */
00053 
00054 /*
00055  * Local Variables:
00056  * c-basic-offset: 4
00057  * tab-width: 4
00058  * End:
00059  * vim600: fdm=marker
00060  * vim: noet sw=4 ts=4
00061  */