diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-11-04 11:49:25 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-11-04 11:49:25 +0900 |
| commit | de2363a9f0c7d368ee9002f86931d124e644a243 (patch) | |
| tree | 2112928a80786a109ecac4b3ce200f45ac75e2cb /include/mruby.h | |
| parent | 388d26d77027feaa3e107abf7209e2681868bbe6 (diff) | |
| parent | 625f9f6fa314872968632c5adbee7fb3823268b8 (diff) | |
| download | mruby-de2363a9f0c7d368ee9002f86931d124e644a243.tar.gz mruby-de2363a9f0c7d368ee9002f86931d124e644a243.zip | |
Merge branch 'mrb_without_float' of https://github.com/pandax381/mruby into pandax381-mrb_without_float
Diffstat (limited to 'include/mruby.h')
| -rw-r--r-- | include/mruby.h | 8 |
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")) |
