Commit f01882a8 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #2714 from xxuejie/use-setter-macro-when-necessary

Use setter macro instead of directly setting values
parents 23e69edd d63e45a0
...@@ -1920,7 +1920,7 @@ RETRY_TRY_BLOCK: ...@@ -1920,7 +1920,7 @@ RETRY_TRY_BLOCK:
SET_FLOAT_VALUE(mrb, regs[a], (mrb_float)x + (mrb_float)y); SET_FLOAT_VALUE(mrb, regs[a], (mrb_float)x + (mrb_float)y);
break; break;
} }
mrb_fixnum(regs[a]) = z; SET_INT_VALUE(regs[a], z);
} }
break; break;
case MRB_TT_FLOAT: case MRB_TT_FLOAT:
...@@ -1958,7 +1958,7 @@ RETRY_TRY_BLOCK: ...@@ -1958,7 +1958,7 @@ RETRY_TRY_BLOCK:
SET_FLOAT_VALUE(mrb, regs_a[0], (mrb_float)x - (mrb_float)y); SET_FLOAT_VALUE(mrb, regs_a[0], (mrb_float)x - (mrb_float)y);
} }
else { else {
mrb_fixnum(regs_a[0]) = z; SET_INT_VALUE(regs_a[0], z);
} }
} }
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment