5 extern zend_module_entry psi_module_entry
;
6 #define phpext_psi_ptr &psi_module_entry
8 #define PHP_PSI_VERSION "0.1.0"
11 # define PHP_PSI_API __declspec(dllexport)
12 #elif defined(__GNUC__) && __GNUC__ >= 4
13 # define PHP_PSI_API __attribute__ ((visibility("default")))
25 void psi_error(int type
, const char *msg
, ...);
27 static inline int psi_check_env(const char *var
) {
28 char *set
= getenv(var
);
29 return (set
&& *set
&& '0' != *set
);
32 size_t psi_t_alignment(token_t t
);
33 size_t psi_t_size(token_t t
);
34 size_t psi_t_align(token_t t
, size_t s
);
36 int psi_internal_type(impl_type
*type
);
37 zend_internal_arg_info
*psi_internal_arginfo(impl
*impl
);
38 size_t psi_num_min_args(impl
*impl
);
40 void psi_to_bool(zval
*return_value
, set_value
*set
, impl_val
*ret_val
);
41 void psi_to_int(zval
*return_value
, set_value
*set
, impl_val
*ret_val
);
42 void psi_to_double(zval
*return_value
, set_value
*set
, impl_val
*ret_val
);
43 void psi_to_string(zval
*return_value
, set_value
*set
, impl_val
*ret_val
);
44 void psi_to_array(zval
*return_value
, set_value
*set
, impl_val
*ret_val
);
46 void psi_call(zend_execute_data
*execute_data
, zval
*return_value
, impl
*impl
);
48 ZEND_BEGIN_MODULE_GLOBALS(psi
)
52 ZEND_END_MODULE_GLOBALS(psi
);
54 #define PSI_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(psi, v)
56 #if defined(ZTS) && defined(COMPILE_DL_PSI)
57 ZEND_TSRMLS_CACHE_EXTERN();
60 #endif /* PHP_PSI_H */
68 * vim600: noet sw=4 ts=4 fdm=marker
69 * vim<600: noet sw=4 ts=4