libabacus/src/parsetype.c

12 lines
296 B
C
Raw Normal View History

#include "parsetype.h"
#include <stdlib.h>
void libab_parsetype_free(libab_parsetype* type) {
2018-04-21 14:09:01 -07:00
if (!(type->variant & LIBABACUS_TYPE_F_RESOLVED)) {
free(type->data_u.name);
}
2018-04-21 14:09:01 -07:00
if (type->variant & LIBABACUS_TYPE_F_PARENT) {
2018-04-17 22:14:07 -07:00
libab_ref_vec_free(&(type->children));
}
}