update readme
[m6w6/ext-psi] / src / engine.h
1 #ifndef _PSI_ENGINE_H
2 #define _PSI_ENGINE_H
3
4 size_t psi_t_alignment(token_t t);
5 size_t psi_t_size(token_t t);
6
7 static inline size_t psi_align(size_t s, size_t a) {
8 return ((s - 1) | (a - 1)) + 1;
9 }
10
11 static inline size_t psi_offset_padding(size_t diff, size_t alignment) {
12 if (diff && diff <= psi_align(diff, alignment)) {
13 diff = 0;
14 }
15
16 return diff;
17 }
18
19 int psi_internal_type(impl_type *type);
20 zend_internal_arg_info *psi_internal_arginfo(impl *impl);
21 size_t psi_num_min_args(impl *impl);
22
23 void psi_call(zend_execute_data *execute_data, zval *return_value, impl *impl);
24
25 #endif