summaryrefslogtreecommitdiffhomepage
path: root/include/mrbconf.h
diff options
context:
space:
mode:
authorYukihiro Matz Matsumoto <[email protected]>2013-03-18 07:57:07 +0900
committerYukihiro Matz Matsumoto <[email protected]>2013-03-18 07:57:07 +0900
commit13cd0363f0803d2cf0116cc28d5749dfbad6da83 (patch)
tree2a67f297a33e9e45df1c659557c887c774272dd5 /include/mrbconf.h
parent7872bee70013ed0763942f6097ca0a61000fc92a (diff)
downloadmruby-13cd0363f0803d2cf0116cc28d5749dfbad6da83.tar.gz
mruby-13cd0363f0803d2cf0116cc28d5749dfbad6da83.zip
applying C++ patch from @monaka to support C++ bool type; close #1019
Diffstat (limited to 'include/mrbconf.h')
-rw-r--r--include/mrbconf.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/mrbconf.h b/include/mrbconf.h
index b485642dc..030e00c9f 100644
--- a/include/mrbconf.h
+++ b/include/mrbconf.h
@@ -115,10 +115,18 @@ typedef short mrb_sym;
# define strtoll _strtoi64
# define PRId32 "I32d"
# define PRId64 "I64d"
+# ifdef __cplusplus
+typedef bool mrb_bool;
+# else
typedef unsigned int mrb_bool;
+# endif
#else
# include <inttypes.h>
+# ifdef __cplusplus
+typedef bool mrb_bool;
+# else
typedef _Bool mrb_bool;
+# endif
#endif
#ifdef ENABLE_STDIO