a9d6270956d249d24f2c35c31b3d2b9f4e40be63
1 #ifndef _PSI_TYPES_IMPL_FUNC_H
2 #define _PSI_TYPES_IMPL_FUNC_H
4 typedef struct impl_func
{
5 struct psi_token
*token
;
8 impl_type
*return_type
;
9 unsigned return_reference
:1;
12 static inline impl_func
*init_impl_func(char *name
, impl_args
*args
, impl_type
*type
, int ret_reference
) {
13 impl_func
*func
= calloc(1, sizeof(*func
));
14 func
->name
= strdup(name
);
15 func
->args
= args
? args
: init_impl_args(NULL
);
16 func
->return_type
= type
;
17 func
->return_reference
= ret_reference
;
21 static inline void free_impl_func(impl_func
*f
) {
25 free_impl_type(f
->return_type
);
26 free_impl_args(f
->args
);