diff options
Diffstat (limited to 'val.h')
-rw-r--r-- | val.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -71,6 +71,8 @@ ObjString *objstring_take(State *S, char *src, size_t len); #define VAL_NIL ((Val){.ty=TY_NIL}) #define VAL_NUM(x) ((Val){.ty=TY_NUM, .as.d=(x) }) #define VAL_BOOL(x) ((Val){.ty=TY_BOOL, .as.b=(x) }) +#define VAL_TRUE VAL_BOOL(1) +#define VAL_FALSE VAL_BOOL(0) #define VAL_OBJ(x) ((Val){.ty=TY_OBJ, .as.o=(Obj*)(x) }) static inline bool is_obj_ty(Val v, ObjTy t) { |