summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authordearblue <[email protected]>2019-02-16 21:24:05 +0900
committerdearblue <[email protected]>2019-02-16 21:24:05 +0900
commitd1db959cabd017ecf167edff343d6aacf25142fe (patch)
tree9dea3043cb960e7116f723299c1e38df281a6248 /include
parentc769013f9b09400d9d827f1eb12581eb6bba80ff (diff)
downloadmruby-d1db959cabd017ecf167edff343d6aacf25142fe.tar.gz
mruby-d1db959cabd017ecf167edff343d6aacf25142fe.zip
Fix to defined `MRB_SYMBOL_BITSIZE` and `MRB_SYMBOL_MAX` always; ref #4077
Diffstat (limited to 'include')
-rw-r--r--include/mruby/value.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mruby/value.h b/include/mruby/value.h
index f988826ca..1ed20858f 100644
--- a/include/mruby/value.h
+++ b/include/mruby/value.h
@@ -160,6 +160,10 @@ typedef void mrb_value;
#ifndef mrb_bool
#define mrb_bool(o) (mrb_type(o) != MRB_TT_FALSE)
#endif
+#if !defined(MRB_SYMBOL_BITSIZE)
+#define MRB_SYMBOL_BITSIZE (sizeof(mrb_sym) * CHAR_BIT)
+#define MRB_SYMBOL_MAX UINT32_MAX
+#endif
#ifndef MRB_WITHOUT_FLOAT
#define mrb_float_p(o) (mrb_type(o) == MRB_TT_FLOAT)
#endif