working asctime
[m6w6/ext-psi] / php_psi.h
1
2 #ifndef PHP_PSI_H
3 #define PHP_PSI_H
4
5 extern zend_module_entry psi_module_entry;
6 #define phpext_psi_ptr &psi_module_entry
7
8 #define PHP_PSI_VERSION "0.1.0"
9
10 #ifdef PHP_WIN32
11 # define PHP_PSI_API __declspec(dllexport)
12 #elif defined(__GNUC__) && __GNUC__ >= 4
13 # define PHP_PSI_API __attribute__ ((visibility("default")))
14 #else
15 # define PHP_PSI_API
16 #endif
17
18 #ifdef ZTS
19 #include "TSRM.h"
20 #endif
21
22 #include "context.h"
23 #include "parser.h"
24
25 void psi_error(int type, const char *msg, ...);
26 size_t psi_t_alignment(token_t t);
27 size_t psi_t_size(token_t t);
28 size_t psi_t_align(token_t t, size_t s);
29 int psi_internal_type(impl_type *type);
30 zend_internal_arg_info *psi_internal_arginfo(impl *impl);
31 size_t psi_num_min_args(impl *impl);
32 void psi_to_int(impl_val *ret_val, decl_arg *func, zval *return_value);
33 void psi_to_double(impl_val *ret_val, decl_arg *func, zval *return_value);
34 void psi_to_string(impl_val *ret_val, decl_arg *func, zval *return_value);
35 ZEND_RESULT_CODE psi_parse_args(zend_execute_data *execute_data, impl *impl);
36 impl_val *psi_do_let(decl_arg *darg);
37 void psi_do_set(zval *return_value, set_func *func, decl_vars *vars);
38 void psi_do_return(impl *impl, impl_val *ret_val, zval *return_value);
39 void psi_do_free(free_stmt *fre);
40 void psi_do_clean(impl *impl);
41
42 ZEND_BEGIN_MODULE_GLOBALS(psi)
43 char *engine;
44 char *directory;
45 PSI_Context context;
46 ZEND_END_MODULE_GLOBALS(psi);
47
48 #define PSI_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(psi, v)
49
50 #if defined(ZTS) && defined(COMPILE_DL_PSI)
51 ZEND_TSRMLS_CACHE_EXTERN();
52 #endif
53
54 #endif /* PHP_PSI_H */
55
56
57 /*
58 * Local variables:
59 * tab-width: 4
60 * c-basic-offset: 4
61 * End:
62 * vim600: noet sw=4 ts=4 fdm=marker
63 * vim<600: noet sw=4 ts=4
64 */