diff options
Diffstat (limited to 'val.c')
-rw-r--r-- | val.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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; +} |