summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mrbconf.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/mrbconf.h b/include/mrbconf.h
index f87e2ef43..478b79019 100644
--- a/include/mrbconf.h
+++ b/include/mrbconf.h
@@ -8,12 +8,19 @@
#define MRUBYCONF_H
#include <stdint.h>
+#define MRB_USE_FLOAT
+
+#ifdef MRB_USE_FLOAT
+typedef float mrb_float;
+#define readfloat(p) strtof((p),NULL)
+#else
typedef double mrb_float;
+#define readfloat(p) strtod((p),NULL)
+#endif
+
typedef int32_t mrb_int;
typedef intptr_t mrb_sym;
-
#define readint(p,base) strtol((p),NULL,(base))
-#define readfloat(p) strtod((p),NULL)
#undef INCLUDE_ENCODING /* not use encoding classes (ascii only) */
#define INCLUDE_ENCODING /* use UTF-8 encoding classes */