X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=php_psi.h;h=9ebf8e79925fd21d119c679d0a1baa14aab65397;hp=3e582d0036b7d50cc1db35766004ff7aeff74264;hb=3c53642a0adccd4b602d147833da24eb4b73bccc;hpb=6af43d341ce260ffd7d5d443bc0b535692d5f67e diff --git a/php_psi.h b/php_psi.h index 3e582d0..9ebf8e7 100644 --- a/php_psi.h +++ b/php_psi.h @@ -23,16 +23,25 @@ extern zend_module_entry psi_module_entry; #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_int(impl_val *ret_val, decl_arg *func, zval *return_value); -void psi_to_double(impl_val *ret_val, decl_arg *func, zval *return_value); -void psi_to_string(impl_val *ret_val, decl_arg *func, zval *return_value); + +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); + ZEND_RESULT_CODE psi_parse_args(zend_execute_data *execute_data, impl *impl); -impl_val *psi_do_let(decl_arg *darg); -void psi_do_set(zval *return_value, set_func *func, decl_vars *vars); -void psi_do_return(impl *impl, impl_val *ret_val, zval *return_value); +void *psi_do_let(decl_arg *darg); +void psi_do_set(zval *return_value, set_value *set); +void psi_do_return(zval *return_value, return_stmt *ret, impl_val *ret_val); void psi_do_free(free_stmt *fre); void psi_do_clean(impl *impl);