diff options
Diffstat (limited to 'val.h')
-rw-r--r-- | val.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -2,6 +2,9 @@ #define _val_h #include <stdbool.h> +#include <stdint.h> +#include <stddef.h> + typedef struct _val Val; typedef struct _obj Obj; @@ -38,10 +41,12 @@ typedef struct _obj { typedef struct { Obj obj; size_t len; + uint32_t hash; char *b; } ObjString; -// copies data -ObjString *objstring_new(char *src, size_t len); + +ObjString *objstring_copy(char *src, size_t len); +ObjString *objstring_take(char *src, size_t len); #define IS_NIL(x) (x.ty == NIL) |