Minor refactor, added vm.* library

- cosmoV_pushObj() has been added
- cbaselib.h has been cleaned up a bit
This commit is contained in:
2021-01-25 15:04:16 -06:00
parent 0be6e7dff1
commit cd6744ab65
8 changed files with 158 additions and 56 deletions

View File

@@ -1630,7 +1630,7 @@ CObjFunction* cosmoP_compileString(CState *state, const char *source, const char
freeParseState(&parser);
// push the funciton onto the stack so if we cause an GC event, it won't be free'd
cosmoV_pushValue(state, cosmoV_newObj(resFunc));
cosmoV_pushObj(state, (CObj*)resFunc);
cosmoM_unfreezeGC(state);
cosmoV_pop(state);
return resFunc;