summaryrefslogtreecommitdiffhomepage
path: root/src/hash.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-08-14 14:34:53 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-10-12 16:21:40 +0900
commit8a87549315d0c7fd984a8ad239ebe3dbab4d2855 (patch)
treeb5a0209755619ecc2e7bca1314b7a8e61c7b0d21 /src/hash.c
parentef9df5dc7d32b79e6b4e0d6924eeae2cc614dfce (diff)
downloadmruby-8a87549315d0c7fd984a8ad239ebe3dbab4d2855.tar.gz
mruby-8a87549315d0c7fd984a8ad239ebe3dbab4d2855.zip
Rename float configuration option names.
- `MRB_WITHOUT_FLOAT` => `MRB_NO_FLOAT` - `MRB_USE_FLOAT` => `MRB_USE_FLOAT32` The former is to use `USE_XXX` naming convention. The latter is to make sure `float` is 32bit float and not floating point number in general.
Diffstat (limited to 'src/hash.c')
-rw-r--r--src/hash.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hash.c b/src/hash.c
index 72ed3c731..2eef4afaf 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -11,7 +11,7 @@
#include <mruby/string.h>
#include <mruby/variable.h>
-#ifndef MRB_WITHOUT_FLOAT
+#ifndef MRB_NO_FLOAT
/* a function to get hash value of a float number */
mrb_int mrb_float_id(mrb_float f);
#endif
@@ -65,7 +65,7 @@ ht_hash_func(mrb_state *mrb, htable *t, mrb_value key)
case MRB_TT_FALSE:
case MRB_TT_SYMBOL:
case MRB_TT_FIXNUM:
-#ifndef MRB_WITHOUT_FLOAT
+#ifndef MRB_NO_FLOAT
case MRB_TT_FLOAT:
#endif
h = (size_t)mrb_obj_id(key);
@@ -99,7 +99,7 @@ ht_hash_equal(mrb_state *mrb, htable *t, mrb_value a, mrb_value b)
switch (mrb_type(b)) {
case MRB_TT_FIXNUM:
return mrb_fixnum(a) == mrb_fixnum(b);
-#ifndef MRB_WITHOUT_FLOAT
+#ifndef MRB_NO_FLOAT
case MRB_TT_FLOAT:
return (mrb_float)mrb_fixnum(a) == mrb_float(b);
#endif
@@ -107,7 +107,7 @@ ht_hash_equal(mrb_state *mrb, htable *t, mrb_value a, mrb_value b)
return FALSE;
}
-#ifndef MRB_WITHOUT_FLOAT
+#ifndef MRB_NO_FLOAT
case MRB_TT_FLOAT:
switch (mrb_type(b)) {
case MRB_TT_FIXNUM: