summaryrefslogtreecommitdiffhomepage
path: root/src/codegen.c
diff options
context:
space:
mode:
authorYuichiro MASUI <[email protected]>2012-10-27 14:26:50 +0900
committerYuichiro MASUI <[email protected]>2012-10-27 14:26:50 +0900
commit15f46a1feba74cba4f25ec99df79a3f1e07b0b09 (patch)
tree04bbc7fceaf3ee7ddbcfb1dfbf623aaebff720ef /src/codegen.c
parent559933f577d5073464aa06facc1b754de6225d8a (diff)
downloadmruby-15f46a1feba74cba4f25ec99df79a3f1e07b0b09.tar.gz
mruby-15f46a1feba74cba4f25ec99df79a3f1e07b0b09.zip
define convert method mrb_int/mrb_float with C string
Diffstat (limited to 'src/codegen.c')
-rw-r--r--src/codegen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/codegen.c b/src/codegen.c
index 2d01ed701..9bba9de71 100644
--- a/src/codegen.c
+++ b/src/codegen.c
@@ -1738,7 +1738,7 @@ codegen(codegen_scope *s, node *tree, int val)
case NODE_FLOAT:
if (val) {
char *p = (char*)tree;
- mrb_float f = readfloat(p);
+ mrb_float f = str_to_mrb_float(p);
int off = new_lit(s, mrb_float_value(f));
genop(s, MKOP_ABx(OP_LOADL, cursp(), off));
@@ -1754,7 +1754,7 @@ codegen(codegen_scope *s, node *tree, int val)
case NODE_FLOAT:
{
char *p = (char*)tree;
- mrb_float f = readfloat(p);
+ mrb_float f = str_to_mrb_float(p);
int off = new_lit(s, mrb_float_value(-f));
genop(s, MKOP_ABx(OP_LOADL, cursp(), off));