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.c | |
parent | 8c3037662ba572a6935170dbd4cb8cc8a3636417 (diff) |
refactor error checking and argument parsing
Diffstat (limited to 'val.c')
-rw-r--r-- | val.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -47,9 +47,10 @@ static ObjString *objstring_create(State *S, char *src, size_t len, uint32_t has return o; } -ObjFunc *objfunc_new(State *S) { +ObjFunc *objfunc_new(State *S, uint8_t arity) { ObjFunc *o = NEW_OBJ(S, ObjFunc, OTY_FUNC); o->ch = chunk_new(S); + o->arity = arity; return o; } |