Added cosmoV_pushFString(), and cosmoO_pushVFString().

cosmoV_error now pushes the error string onto the stack, as well as uses cosmoO_VFString to format strings.
cosmoV_concat is now entirely self contained, and is now stack based. Push the CValues you want to concat into strings onto the stack and call cosmoV_concat with the # of values you pushed.
This commit is contained in:
2020-12-22 15:13:11 -06:00
parent de3a89ad4f
commit 31a852a127
5 changed files with 92 additions and 28 deletions

View File

@@ -17,6 +17,8 @@ COSMO_API COSMOVMRESULT cosmoV_call(CState *state, int args, int nresults);
COSMO_API void cosmoV_makeObject(CState *state, int pairs);
COSMO_API void cosmoV_makeDictionary(CState *state, int pairs);
COSMO_API bool cosmoV_getObject(CState *state, CObjObject *object, CValue key, CValue *val);
COSMO_API void cosmoV_concat(CState *state, int vals);
COSMO_API void cosmoV_pushFString(CState *state, const char *format, ...);
COSMO_API void cosmoV_error(CState *state, const char *format, ...);
// nice to have wrappers