diff --git a/src/object.c b/src/object.c index 4a2ecab..5a00b9b 100644 --- a/src/object.c +++ b/src/object.c @@ -668,7 +668,12 @@ inline Object boolObject(int b) // Skips first and last chars! Assumed to be '"' inline Object objFromSlice(const char *string, int len) { - Object o = symFromSlice(&string[1], len - 1); + return stringFromSlice(&string[1], len - 1); +} + +inline Object stringFromSlice(const char *string, int len) +{ + Object o = symFromSlice(string, len); o.type = TYPE_STRING; return o; } diff --git a/src/object.h b/src/object.h index 68bbe55..0841a57 100644 --- a/src/object.h +++ b/src/object.h @@ -124,6 +124,7 @@ Object newObject(Type type); Object listObject(); Object startList(const Object start); Object objFromSlice(const char *string, int len); +Object stringFromSlice(const char *string, int len); Object symFromSlice(const char *string, int len); Object boolObject(int b); Object numberObject(int num);