summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-08-01 00:06:50 +0900
committerYukihiro Matsumoto <[email protected]>2012-08-01 00:06:50 +0900
commit1563cdfcce7764f47dc8a536ab97368315e15e86 (patch)
tree823bd604e77ffd5d10c588b2632c9f138ce19cc5 /src
parent1d64ecf0fafc940b4523ee44355840104d2f56fb (diff)
downloadmruby-1563cdfcce7764f47dc8a536ab97368315e15e86.tar.gz
mruby-1563cdfcce7764f47dc8a536ab97368315e15e86.zip
float do not have enough precision to represent Fixnum if MRB_USE_FLOAT is set
Diffstat (limited to 'src')
-rw-r--r--src/codegen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/codegen.c b/src/codegen.c
index b944f348e..cfb52ceed 100644
--- a/src/codegen.c
+++ b/src/codegen.c
@@ -806,11 +806,11 @@ raise_error(codegen_scope *s, const char *msg)
genop(s, MKOP_ABx(OP_ERR, 0, idx));
}
-static mrb_float
+static double
readint_float(codegen_scope *s, const char *p, int base)
{
const char *e = p + strlen(p);
- mrb_float f = 0;
+ double f = 0;
int n;
if (*p == '+') p++;
@@ -1589,7 +1589,7 @@ codegen(codegen_scope *s, node *tree, int val)
if (val) {
char *p = (char*)tree->car;
int base = (intptr_t)tree->cdr->car;
- mrb_float f;
+ double f;
mrb_int i;
mrb_code co;