From 08d7465f5a841366ec4c66f11475ede4e9082a8d Mon Sep 17 00:00:00 2001 From: ubq323 Date: Mon, 24 Jun 2024 16:49:15 +0100 Subject: refactor error checking and argument parsing --- val.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'val.c') diff --git a/val.c b/val.c index 930ebd8..ec200d3 100644 --- a/val.c +++ b/val.c @@ -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; } -- cgit v1.2.3