1 : /*
2 : +----------------------------------------------------------------------+
3 : | PHP Version 6 |
4 : +----------------------------------------------------------------------+
5 : | Copyright (c) 1997-2009 The PHP Group |
6 : +----------------------------------------------------------------------+
7 : | This source file is subject to version 3.01 of the PHP license, |
8 : | that is bundled with this package in the file LICENSE, and is |
9 : | available through the world-wide-web at the following url: |
10 : | http://www.php.net/license/3_01.txt |
11 : | If you did not receive a copy of the PHP license and are unable to |
12 : | obtain it through the world-wide-web, please send a note to |
13 : | license@php.net so we can mail you a copy immediately. |
14 : +----------------------------------------------------------------------+
15 : | Authors: Marcus Boerger <helly@php.net> |
16 : +----------------------------------------------------------------------+
17 : */
18 :
19 : /* $Id: spl_engine.h 277841 2009-03-26 20:02:53Z felipe $ */
20 :
21 : #ifndef SPL_ENGINE_H
22 : #define SPL_ENGINE_H
23 :
24 : #include "php.h"
25 : #include "php_spl.h"
26 : #include "zend_interfaces.h"
27 : #include "zend_unicode.h"
28 :
29 : PHPAPI void spl_instantiate(zend_class_entry *pce, zval **object, int alloc TSRMLS_DC);
30 :
31 : PHPAPI long spl_offset_convert_to_long(zval *offset TSRMLS_DC);
32 :
33 : /* {{{ spl_instantiate_arg_ex1 */
34 : static inline int spl_instantiate_arg_ex1(zend_class_entry *pce, zval **retval, int alloc, zval *arg1 TSRMLS_DC)
35 332 : {
36 332 : spl_instantiate(pce, retval, alloc TSRMLS_CC);
37 :
38 332 : zend_u_call_method(retval, pce, &pce->constructor, IS_UNICODE, pce->constructor->common.function_name, USTR_LEN(pce->constructor->common.function_name), NULL, 1, arg1, NULL TSRMLS_CC);
39 332 : return 0;
40 : }
41 : /* }}} */
42 :
43 : /* {{{ spl_instantiate_arg_ex2 */
44 : static inline int spl_instantiate_arg_ex2(zend_class_entry *pce, zval **retval, int alloc, zval *arg1, zval *arg2 TSRMLS_DC)
45 399 : {
46 399 : spl_instantiate(pce, retval, alloc TSRMLS_CC);
47 :
48 399 : zend_u_call_method(retval, pce, &pce->constructor, IS_UNICODE, pce->constructor->common.function_name, USTR_LEN(pce->constructor->common.function_name), NULL, 2, arg1, arg2 TSRMLS_CC);
49 399 : return 0;
50 : }
51 : /* }}} */
52 :
53 : #endif /* SPL_ENGINE_H */
54 :
55 : /*
56 : * Local Variables:
57 : * c-basic-offset: 4
58 : * tab-width: 4
59 : * End:
60 : * vim600: fdm=marker
61 : * vim: noet sw=4 ts=4
62 : */
|