20 lines
357 B
C
20 lines
357 B
C
|
#include "fun.h"
|
||
|
#include "sym.h"
|
||
|
|
||
|
void fun_init(fun_t* fun, struct tysy* tysy, err_t* err)
|
||
|
{
|
||
|
assert(fun);
|
||
|
program_init(&fun->program);
|
||
|
fun->sym = malloc(sizeof(sym_t));
|
||
|
sym_init((sym_t*) fun->sym, (tysy_t*) tysy, err);
|
||
|
}
|
||
|
|
||
|
void fun_free(fun_t* fun)
|
||
|
{
|
||
|
assert(fun);
|
||
|
program_free(&fun->program);
|
||
|
|
||
|
sym_free((sym_t*) fun->sym);
|
||
|
free(fun->sym);
|
||
|
}
|