mirror of
https://github.com/CPunch/Cosmo.git
synced 2025-09-28 22:27:38 +00:00
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:
@@ -154,6 +154,15 @@ CObjString *cosmoO_takeString(CState *state, char *str, size_t sz);
|
||||
// allocates a CObjStruct pointing directly to *str
|
||||
CObjString *cosmoO_allocateString(CState *state, const char *str, size_t sz, uint32_t hash);
|
||||
|
||||
/*
|
||||
formats strings to push onto the VM stack, formatting supported:
|
||||
|
||||
'%d' - decimal numbers [int]
|
||||
'%f' - floating point [double]
|
||||
'%s' - strings [const char*]
|
||||
*/
|
||||
CObjString *cosmoO_pushVFString(CState *state, const char *format, va_list args);
|
||||
|
||||
COSMO_API void printObject(CObj *o);
|
||||
const char *cosmoO_typeStr(CObj* obj);
|
||||
|
||||
|
Reference in New Issue
Block a user