Merge pull request #936 from monaka/pr-cleanup-range.c-20130303

Clean up range.c. Use mrb_int. Use mrb_vtype.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2013-03-03 09:25:26 -08:00
+4 -4
View File
@@ -16,8 +16,8 @@ static void
range_check(mrb_state *mrb, mrb_value a, mrb_value b)
{
mrb_value ans;
int ta;
int tb;
enum mrb_vtype ta;
enum mrb_vtype tb;
ta = mrb_type(a);
tb = mrb_type(b);
@@ -181,7 +181,7 @@ r_le(mrb_state *mrb, mrb_value a, mrb_value b)
/* output :a < b => -1, a = b => 0, a > b => +1 */
if (mrb_type(r) == MRB_TT_FIXNUM) {
int c = mrb_fixnum(r);
mrb_int c = mrb_fixnum(r);
if (c == 0 || c == -1) return TRUE;
}
@@ -208,7 +208,7 @@ r_ge(mrb_state *mrb, mrb_value a, mrb_value b)
/* output :a < b => -1, a = b => 0, a > b => +1 */
if (mrb_type(r) == MRB_TT_FIXNUM) {
int c = mrb_fixnum(r);
mrb_int c = mrb_fixnum(r);
if (c == 0 || c == 1) return TRUE;
}