libabacus/src/custom.c

17 lines
402 B
C
Raw Normal View History

#include "custom.h"
void libab_behavior_free(libab_behavior* behavior) {
2018-04-17 22:14:07 -07:00
libab_ref_free(&behavior->type);
2018-04-21 14:09:01 -07:00
if (behavior->impl.variant == BIMPL_TREE) {
libab_ref_free(&behavior->impl.data_u.tree);
}
}
void libab_operator_free(libab_operator* op) {
libab_behavior_free(&op->behavior);
}
void libab_function_free(libab_function* fun) {
libab_behavior_free(&fun->behavior);
}