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

@@ -26,7 +26,7 @@ int cosmoB_input(CState *state, int nargs, CValue *args) {
char line[1024];
fgets(line, sizeof(line), stdin);
cosmoV_pushValue(state, cosmoV_newObj(cosmoO_copyString(state, line, strlen(line)-1))); // -1 for the \n
cosmoV_pushObj(state, (CObj*)cosmoO_copyString(state, line, strlen(line)-1)); // -1 for the \n
return 1; // 1 return value
}