added HCL_EUNDEFVAR
This commit is contained in:
7
lib/gc.c
7
lib/gc.c
@ -583,6 +583,7 @@ void hcl_gc (hcl_t* hcl)
|
||||
old_nil = hcl->_nil;
|
||||
|
||||
/* move _nil and the root object table */
|
||||
hcl->_undef = hcl_moveoop(hcl, hcl->_undef);
|
||||
hcl->_nil = hcl_moveoop(hcl, hcl->_nil);
|
||||
hcl->_true = hcl_moveoop(hcl, hcl->_true);
|
||||
hcl->_false = hcl_moveoop(hcl, hcl->_false);
|
||||
@ -766,6 +767,12 @@ int hcl_ignite (hcl_t* hcl, hcl_oow_t heapsize)
|
||||
if (HCL_UNLIKELY(!hcl->heap)) return -1;
|
||||
}
|
||||
|
||||
if (!hcl->_undef)
|
||||
{
|
||||
hcl->_undef = hcl_makeundef(hcl);
|
||||
if (HCL_UNLIKELY(!hcl->_undef)) return -1;
|
||||
}
|
||||
|
||||
if (!hcl->_nil)
|
||||
{
|
||||
hcl->_nil = hcl_makenil(hcl);
|
||||
|
Reference in New Issue
Block a user