Use more mrb_int_value() instead of mrb_fixnum_value().

This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-11-24 20:52:25 +09:00
parent 2e30c68562
commit 40235f3050
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -455,7 +455,7 @@ mrb_file_size(mrb_state *mrb, mrb_value self)
#endif
}
return mrb_fixnum_value((mrb_int)st.st_size);
return mrb_int_value(mrb, (mrb_int)st.st_size);
}
static int
+2 -2
View File
@@ -995,7 +995,7 @@ mrb_io_sysseek(mrb_state *mrb, mrb_value io)
mrb_raise(mrb, E_IO_ERROR, "sysseek reached too far for MRB_NO_FLOAT");
#endif
} else {
return mrb_fixnum_value(pos);
return mrb_int_value(mrb, pos);
}
}
@@ -1022,7 +1022,7 @@ mrb_io_syswrite_common(mrb_state *mrb,
mrb_sys_fail(mrb, 0);
}
return mrb_fixnum_value(length);
return mrb_int_value(mrb, (mrb_int)length);
}
static mrb_io_read_write_size