mirror of
https://github.com/CPunch/Cosmo.git
synced 2025-10-27 11:20:06 +00:00
Major refactoring, added classes, many bug fixes
This commit is contained in:
@@ -9,13 +9,12 @@ void cosmoB_loadlibrary(CState *state) {
|
||||
cosmoM_unfreezeGC(state);
|
||||
}
|
||||
|
||||
int cosmoB_print(CState *state, int nargs, CValue *args) {
|
||||
CValue cosmoB_print(CState *state, int nargs, CValue *args) {
|
||||
for (int i = 0; i < nargs; i++) {
|
||||
CObjString *str = cosmoV_toString(state, args[i]);
|
||||
printf("%s", cosmoO_readCString(str));
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
return 0; // print doesn't return any args
|
||||
return cosmoV_newNil(); // print doesn't return any args
|
||||
}
|
||||
Reference in New Issue
Block a user