X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=php_psi.h;h=b4b96e872f59ff8cd43cfcaea5f6d8fcdbfdee63;hp=4be402729382bf8be7b713fce16a0060db7347ae;hb=7a717dad32d06fe5273ad3a9ce755908723f6685;hpb=4a49fe2f8eb21cdeabb06acec7a0395b6708d911 diff --git a/php_psi.h b/php_psi.h index 4be4027..b4b96e8 100644 --- a/php_psi.h +++ b/php_psi.h @@ -19,7 +19,29 @@ extern zend_module_entry psi_module_entry; #include "TSRM.h" #endif +#include "context.h" +#include "parser.h" + +void psi_error(int type, const char *msg, ...); + +size_t psi_t_alignment(token_t t); +size_t psi_t_size(token_t t); +size_t psi_t_align(token_t t, size_t s); + +int psi_internal_type(impl_type *type); +zend_internal_arg_info *psi_internal_arginfo(impl *impl); +size_t psi_num_min_args(impl *impl); + +void psi_to_bool(zval *return_value, token_t t, impl_val *ret_val, set_value *set, decl_var *var); +void psi_to_int(zval *return_value, token_t t, impl_val *ret_val, set_value *set, decl_var *var); +void psi_to_double(zval *return_value, token_t t, impl_val *ret_val, set_value *set, decl_var *var); +void psi_to_string(zval *return_value, token_t t, impl_val *ret_val, set_value *set, decl_var *var); +void psi_to_array(zval *return_value, token_t t, impl_val *ret_val, set_value *set, decl_var *var); + +void psi_call(zend_execute_data *execute_data, zval *return_value, impl *impl); + ZEND_BEGIN_MODULE_GLOBALS(psi) + char *engine; char *directory; PSI_Context context; ZEND_END_MODULE_GLOBALS(psi);