diff options
author | ubq323 <ubq323@ubq323.website> | 2024-06-24 16:49:15 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-06-24 16:49:15 +0100 |
commit | 08d7465f5a841366ec4c66f11475ede4e9082a8d (patch) | |
tree | 556527c70b412034a4c7ae18f70a7f6906391900 /val.h | |
parent | 8c3037662ba572a6935170dbd4cb8cc8a3636417 (diff) |
refactor error checking and argument parsing
Diffstat (limited to 'val.h')
-rw-r--r-- | val.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -54,6 +54,7 @@ typedef struct { typedef struct { Obj obj; Chunk ch; + uint8_t arity; } ObjFunc; // Constructs a new objstring from the given C string, @@ -64,7 +65,7 @@ ObjString *objstring_copy_cstr(State *s, char *str); // taking ownership of the provided data. ObjString *objstring_take(State *S, char *src, size_t len); -ObjFunc *objfunc_new(State *S); +ObjFunc *objfunc_new(State *S, uint8_t arity); #define IS_NIL(x) (x.ty == TY_NIL) #define IS_NUM(x) (x.ty == TY_NUM) |