summaryrefslogtreecommitdiffhomepage
path: root/include/mrbconf.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mrbconf.h')
-rw-r--r--include/mrbconf.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/include/mrbconf.h b/include/mrbconf.h
index b665fb9f7..0caa3f90e 100644
--- a/include/mrbconf.h
+++ b/include/mrbconf.h
@@ -46,6 +46,12 @@
/* page size of memory pool */
//#define POOL_PAGE_SIZE 16000
+/* initial minimum size for string buffer */
+//#define MRB_STR_BUF_MIN_SIZE 128
+
+/* array size for parser buffer */
+//#define MRB_PARSER_BUF_SIZE 1024
+
/* -DDISABLE_XXXX to drop following features */
//#define DISABLE_STDIO /* use of stdio */
@@ -64,7 +70,7 @@
# define str_to_mrb_float(buf) strtod(buf, NULL)
#endif
-#ifdef MRB_INT64
+#if defined(MRB_INT64)
# ifdef MRB_NAN_BOXING
# error Cannot use NaN boxing when mrb_int is 64bit
# else
@@ -78,6 +84,11 @@
# define PRIXMRB_INT PRIX64
# define str_to_mrb_int(buf) strtoll(buf, NULL, 10)
# endif
+#elif defined(MRB_INT16)
+ typedef int16_t mrb_int;
+# define MRB_INT_MIN INT16_MIN
+# define MRB_INT_MAX INT16_MAX
+# define str_to_mrb_int(buf) strtol(buf, NULL, 10)
#else
typedef int32_t mrb_int;
# define MRB_INT_MIN INT32_MIN
@@ -124,8 +135,18 @@ typedef short mrb_sym;
# define PRIo64 "I64o"
# define PRIx64 "I64x"
# define PRIX64 "I64X"
+# 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