49c6b7391cde7291111684572d4377132e8682bd
1 #ifndef _PSI_TYPES_DECL_UNOINS_H
2 #define _PSI_TYPES_DECL_UNOINS_H
4 typedef struct decl_unions
{
9 static inline decl_unions
*add_decl_union(decl_unions
*uu
, decl_union
*u
) {
11 uu
= calloc(1, sizeof(*uu
));
13 uu
->list
= realloc(uu
->list
, ++uu
->count
* sizeof(*uu
->list
));
14 uu
->list
[uu
->count
-1] = u
;
18 static inline void free_decl_unions(decl_unions
*uu
) {
21 for (i
= 0; i
< uu
->count
; ++i
) {
22 free_decl_union(uu
->list
[i
]);