summaryrefslogtreecommitdiffhomepage
path: root/src/dump.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-11-24 16:53:03 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-11-24 16:54:39 +0900
commite55abd239091f7353691c6635d7108391d7ef389 (patch)
tree1936f3a18d99051da979527386235b8b3094812f /src/dump.c
parent36e3c4404af102411b6949e672aa6b73768945d5 (diff)
downloadmruby-e55abd239091f7353691c6635d7108391d7ef389.tar.gz
mruby-e55abd239091f7353691c6635d7108391d7ef389.zip
Fix compiler errors from `MRB_NO_FLOAT`; #5185
Also added `no-float.rb` target in `build_config`.
Diffstat (limited to 'src/dump.c')
-rw-r--r--src/dump.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dump.c b/src/dump.c
index 76d9fe1bc..a79df597b 100644
--- a/src/dump.c
+++ b/src/dump.c
@@ -964,12 +964,14 @@ dump_pool(mrb_state *mrb, const mrb_pool_value *p, FILE *fp)
fprintf(fp, "{IREP_TT_INT32, {.i32=%" PRId32 "}},\n", p->u.i32);
break;
case IREP_TT_FLOAT:
+#ifndef MRB_NO_FLOAT
if (p->u.f == 0) {
fprintf(fp, "{IREP_TT_FLOAT, {.f=%#.1f}},\n", p->u.f);
}
else {
fprintf(fp, "{IREP_TT_FLOAT, {.f=" MRB_FLOAT_FMT "}},\n", p->u.f);
}
+#endif
break;
}
}