work in progress to add the hcl_purgeatdic() function

This commit is contained in:
2018-03-08 10:00:57 +00:00
parent 8cdd423a4e
commit 02b02865ac
6 changed files with 137 additions and 18 deletions

View File

@ -286,9 +286,26 @@ void hcl_fini (hcl_t* hcl)
}
}
void hcl_clear (hcl_t* hcl, int flags)
void hcl_clear (hcl_t* hcl)
{
/* TODO */
hcl_oop_t v;
hcl_oow_t i;
#if 0
/* clear global variables -> especially lambdas, because they refer to the byte codes? */
for (i = 0; i < hcl->code.lit.len; i++)
{
v = ((hcl_oop_oop_t)hcl->code.lit.arr)->slot[ip]);
if (HCL_IS_CONS(v))
{
hcl_delat
}
}
#endif
/* clear the byte code and literals */
hcl->code.bc.len = 0;
hcl->code.lit.len = 0;
hcl_gc (hcl);
}
int hcl_setoption (hcl_t* hcl, hcl_option_t id, const void* value)