summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-test
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-08-03 15:33:35 +0900
committerGitHub <[email protected]>2019-08-03 15:33:35 +0900
commitf6c41c186200e54eaf5d25d301d945570a829f55 (patch)
treee35e2b97906cf6ea98cddc089db4791c2ef56b69 /mrbgems/mruby-test
parentd5695a84dfb030a6111f99822fa385ce3686ffdf (diff)
parenta4243360a2f8248dbf23b46ca14a7a59c0479b32 (diff)
downloadmruby-f6c41c186200e54eaf5d25d301d945570a829f55.tar.gz
mruby-f6c41c186200e54eaf5d25d301d945570a829f55.zip
Merge pull request #4611 from shuujii/fix-mrb_vformat%f-with-MRB_USE_FLOAT
Fix `mrb_vformat("%f")` with `MRB_USE_FLOAT`
Diffstat (limited to 'mrbgems/mruby-test')
-rw-r--r--mrbgems/mruby-test/vformat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mrbgems/mruby-test/vformat.c b/mrbgems/mruby-test/vformat.c
index e6581d6be..e02383f77 100644
--- a/mrbgems/mruby-test/vformat.c
+++ b/mrbgems/mruby-test/vformat.c
@@ -4,6 +4,11 @@
#include <mruby/data.h>
#include <mruby/string.h>
+#ifdef MRB_WITHOUT_FLOAT
+typedef mrb_int mrb_float;
+#define mrb_float(o) mrb_fixnum(o)
+#endif
+
#define NATIVE_TYPES \
char c; \
int d; \