summaryrefslogtreecommitdiffhomepage
path: root/include/mruby.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mruby.h')
-rw-r--r--include/mruby.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/mruby.h b/include/mruby.h
index 1dc2eaf10..1413d604e 100644
--- a/include/mruby.h
+++ b/include/mruby.h
@@ -65,6 +65,7 @@
#include "mrbconf.h"
+#ifndef MRB_WITHOUT_FLOAT
#ifndef FLT_EPSILON
#define FLT_EPSILON (1.19209290e-07f)
#endif
@@ -80,6 +81,7 @@
#else
#define MRB_FLOAT_EPSILON DBL_EPSILON
#endif
+#endif
#include "mruby/common.h"
#include <mruby/value.h>
@@ -206,7 +208,9 @@ typedef struct mrb_state {
struct RClass *hash_class;
struct RClass *range_class;
+#ifndef MRB_WITHOUT_FLOAT
struct RClass *float_class;
+#endif
struct RClass *fixnum_class;
struct RClass *true_class;
struct RClass *false_class;
@@ -1059,7 +1063,9 @@ MRB_API mrb_bool mrb_obj_equal(mrb_state*, mrb_value, mrb_value);
MRB_API mrb_bool mrb_equal(mrb_state *mrb, mrb_value obj1, mrb_value obj2);
MRB_API mrb_value mrb_convert_to_integer(mrb_state *mrb, mrb_value val, mrb_int base);
MRB_API mrb_value mrb_Integer(mrb_state *mrb, mrb_value val);
+#ifndef MRB_WITHOUT_FLOAT
MRB_API mrb_value mrb_Float(mrb_state *mrb, mrb_value val);
+#endif
MRB_API mrb_value mrb_inspect(mrb_state *mrb, mrb_value obj);
MRB_API mrb_bool mrb_eql(mrb_state *mrb, mrb_value obj1, mrb_value obj2);
@@ -1149,7 +1155,9 @@ MRB_API void mrb_print_error(mrb_state *mrb);
#define E_REGEXP_ERROR (mrb_exc_get(mrb, "RegexpError"))
#define E_NOTIMP_ERROR (mrb_exc_get(mrb, "NotImplementedError"))
+#ifndef MRB_WITHOUT_FLOAT
#define E_FLOATDOMAIN_ERROR (mrb_exc_get(mrb, "FloatDomainError"))
+#endif
#define E_KEY_ERROR (mrb_exc_get(mrb, "KeyError"))