diff options
Diffstat (limited to 'val.c')
-rw-r--r-- | val.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -19,6 +19,11 @@ ObjString *objstring_copy(State *S, char *src, size_t len) { return objstring_create(S, d, len, hash); } +ObjString *objstring_copy_cstr(State *S, char *str) { + size_t len = strlen(str); + return objstring_copy(S, str, len); +} + ObjString *objstring_take(State *S, char *src, size_t len) { uint32_t hash = hash_string(src, len); ObjString *interned = ht_findstring(S, &S->strings, src, len, hash); |