439b4e91175d7f1956aa989a3573180b9bbf3a56
1 #ifndef _PSI_TYPES_DECL_STRUCT_H
2 #define _PSI_TYPES_DECL_STRUCT_H
4 typedef struct decl_struct
{
5 struct psi_token
*token
;
12 void (*dtor
)(void *type
);
16 static inline decl_struct
*init_decl_struct(const char *name
, decl_args
*args
) {
17 decl_struct
*s
= calloc(1, sizeof(*s
));
18 s
->name
= strdup(name
);
23 static inline void free_decl_struct(decl_struct
*s
) {
28 free_decl_args(s
->args
);
30 if (s
->engine
.type
&& s
->engine
.dtor
) {
31 s
->engine
.dtor(s
->engine
.type
);