added tonumber() and tostring() to base lib

This commit is contained in:
2021-01-13 14:13:55 -06:00
parent 8cd0112c48
commit e995bb75fb
5 changed files with 56 additions and 1 deletions

View File

@@ -146,7 +146,6 @@ CObjCFunction *cosmoO_newCFunction(CState *state, CosmoCFunction func);
CObjError *cosmoO_newError(CState *state, CValue err);
CObjMethod *cosmoO_newMethod(CState *state, CValue func, CObj *obj);
CObjClosure *cosmoO_newClosure(CState *state, CObjFunction *func);
CObjString *cosmoO_toString(CState *state, CObj *val);
CObjUpval *cosmoO_newUpvalue(CState *state, CValue *val);
// grabs the base proto of the CObj* (if CObj is a CObjObject, that is returned)
@@ -194,4 +193,7 @@ const char *cosmoO_typeStr(CObj* obj);
#define cosmoO_readCString(x) ((CObjString*)x)->str
CObjString *cosmoO_toString(CState *state, CObj *obj);
cosmo_Number cosmoO_toNumber(CState *state, CObj *obj);
#endif