summaryrefslogtreecommitdiff
path: root/val.c
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-06-24 16:49:15 +0100
committerubq323 <ubq323@ubq323.website>2024-06-24 16:49:15 +0100
commit08d7465f5a841366ec4c66f11475ede4e9082a8d (patch)
tree556527c70b412034a4c7ae18f70a7f6906391900 /val.c
parent8c3037662ba572a6935170dbd4cb8cc8a3636417 (diff)
refactor error checking and argument parsing
Diffstat (limited to 'val.c')
-rw-r--r--val.c3
1 files changed, 2 insertions, 1 deletions
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;
}