summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-sprintf
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 /mrbgems/mruby-sprintf
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 'mrbgems/mruby-sprintf')
-rw-r--r--mrbgems/mruby-sprintf/src/sprintf.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mrbgems/mruby-sprintf/src/sprintf.c b/mrbgems/mruby-sprintf/src/sprintf.c
index 0cf462ef7..7f36616ec 100644
--- a/mrbgems/mruby-sprintf/src/sprintf.c
+++ b/mrbgems/mruby-sprintf/src/sprintf.c
@@ -10,7 +10,7 @@
#include <mruby/string.h>
#include <mruby/hash.h>
#include <mruby/numeric.h>
-#ifndef MRB_WITHOUT_FLOAT
+#ifndef MRB_NO_FLOAT
#include <math.h>
#endif
#include <ctype.h>
@@ -20,7 +20,7 @@
#define EXTENDSIGN(n, l) (((~0U << (n)) >> (((n)*(l)) % BITSPERDIG)) & ~(~0U << (n)))
mrb_value mrb_str_format(mrb_state *, mrb_int, const mrb_value *, mrb_value);
-#ifndef MRB_WITHOUT_FLOAT
+#ifndef MRB_NO_FLOAT
static void fmt_setup(char*,size_t,int,int,mrb_int,mrb_int);
#endif
@@ -863,7 +863,7 @@ retry:
bin_retry:
switch (mrb_type(val)) {
-#ifndef MRB_WITHOUT_FLOAT
+#ifndef MRB_NO_FLOAT
case MRB_TT_FLOAT:
val = mrb_flo_to_fixnum(mrb, val);
if (mrb_fixnum_p(val)) goto bin_retry;
@@ -1030,7 +1030,7 @@ retry:
}
break;
-#ifndef MRB_WITHOUT_FLOAT
+#ifndef MRB_NO_FLOAT
case 'f':
case 'g':
case 'G':
@@ -1131,7 +1131,7 @@ retry:
return result;
}
-#ifndef MRB_WITHOUT_FLOAT
+#ifndef MRB_NO_FLOAT
static void
fmt_setup(char *buf, size_t size, int c, int flags, mrb_int width, mrb_int prec)
{