summaryrefslogtreecommitdiff
path: root/val.h
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.h
parent8c3037662ba572a6935170dbd4cb8cc8a3636417 (diff)
refactor error checking and argument parsing
Diffstat (limited to 'val.h')
-rw-r--r--val.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/val.h b/val.h
index 6aa85c5..4ee76d2 100644
--- a/val.h
+++ b/val.h
@@ -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)