diff options
| author | Yukihiro Matz Matsumoto <[email protected]> | 2013-03-19 12:06:53 +0900 |
|---|---|---|
| committer | Yukihiro Matz Matsumoto <[email protected]> | 2013-03-19 12:06:53 +0900 |
| commit | 76025745362abbe1a9ec995bb203e98fcaaa9ac8 (patch) | |
| tree | 259fe8e3c9e58422ad69a1e79f2ec0f1229aa8e4 | |
| parent | d0d920e909497173f562d75309e3b0f0a607778e (diff) | |
| download | mruby-76025745362abbe1a9ec995bb203e98fcaaa9ac8.tar.gz mruby-76025745362abbe1a9ec995bb203e98fcaaa9ac8.zip | |
add new macro mrb_bool as a counterpart of mrb_bool_value
| -rw-r--r-- | include/mruby/value.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/mruby/value.h b/include/mruby/value.h index 325f906d0..5730bf909 100644 --- a/include/mruby/value.h +++ b/include/mruby/value.h @@ -154,7 +154,8 @@ mrb_float_value(mrb_float f) #define mrb_string_p(o) (mrb_type(o) == MRB_TT_STRING) #define mrb_hash_p(o) (mrb_type(o) == MRB_TT_HASH) #define mrb_voidp_p(o) (mrb_type(o) == MRB_TT_VOIDP) -#define mrb_test(o) (mrb_type(o) != MRB_TT_FALSE) +#define mrb_bool(o) (mrb_type(o) != MRB_TT_FALSE) +#define mrb_test(o) mrb_bool(o) #define MRB_OBJECT_HEADER \ enum mrb_vtype tt:8;\ |
