From ec00ec02574b8efaf1b474e2b79aa4d795ceaec0 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Sun, 19 Jan 2014 00:33:33 -0800 Subject: [PATCH] add pic_test macro --- include/picrin/value.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/picrin/value.h b/include/picrin/value.h index 6f1d8fb4..0d9ed4be 100644 --- a/include/picrin/value.h +++ b/include/picrin/value.h @@ -157,6 +157,8 @@ struct pic_blob; #define pic_str_p(v) (pic_type(v) == PIC_TT_STRING) #define pic_vec_p(v) (pic_type(v) == PIC_TT_VECTOR) +#define pic_test(v) (! pic_false_p(v)) + static inline enum pic_tt pic_type(pic_value); static inline const char *pic_type_repr(enum pic_tt);