summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorXuejie "Rafael" Xiao <[email protected]>2015-01-26 10:52:06 +0800
committerXuejie "Rafael" Xiao <[email protected]>2015-01-26 10:52:06 +0800
commitd63e45a0147e88ab30aaa385e9d128b60b09138d (patch)
treeda926e5065d1edfe4aa8c0660dbe8ceb01e750f3
parent23e69edd2db9a8676dd8a7dbcade48b28e0a7e34 (diff)
downloadmruby-d63e45a0147e88ab30aaa385e9d128b60b09138d.tar.gz
mruby-d63e45a0147e88ab30aaa385e9d128b60b09138d.zip
Use setter macro instead of directly setting values
-rw-r--r--src/vm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vm.c b/src/vm.c
index 4434f79b6..697398d87 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -1920,7 +1920,7 @@ RETRY_TRY_BLOCK:
SET_FLOAT_VALUE(mrb, regs[a], (mrb_float)x + (mrb_float)y);
break;
}
- mrb_fixnum(regs[a]) = z;
+ SET_INT_VALUE(regs[a], z);
}
break;
case MRB_TT_FLOAT:
@@ -1958,7 +1958,7 @@ RETRY_TRY_BLOCK:
SET_FLOAT_VALUE(mrb, regs_a[0], (mrb_float)x - (mrb_float)y);
}
else {
- mrb_fixnum(regs_a[0]) = z;
+ SET_INT_VALUE(regs_a[0], z);
}
}
break;