From 5b522325bdc0af283ca6d3ec7d71908858d91b33 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Tue, 6 Aug 2024 18:12:16 +0100 Subject: deastnodeify form compilers --- val.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'val.c') diff --git a/val.c b/val.c index 43e47d3..ed375ac 100644 --- a/val.c +++ b/val.c @@ -184,3 +184,10 @@ const char *typename_str(Val v) { } return "???"; } + +int val_type(Val v) { + if (IS_OBJ(v)) + return AS_OBJ(v)->oty; + else + return v.ty; +} -- cgit v1.2.3