diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-11-24 20:52:25 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-11-24 20:52:25 +0900 |
| commit | 40235f30503764eb27a1ce2875a22d5d43a356b7 (patch) | |
| tree | 5598c1edf69f3f83330527b60daf18d81c960736 | |
| parent | 2e30c68562e6c653191a57fa396e0591b878936f (diff) | |
| download | mruby-40235f30503764eb27a1ce2875a22d5d43a356b7.tar.gz mruby-40235f30503764eb27a1ce2875a22d5d43a356b7.zip | |
Use more `mrb_int_value()` instead of `mrb_fixnum_value()`.
| -rw-r--r-- | mrbgems/mruby-io/src/file.c | 2 | ||||
| -rw-r--r-- | mrbgems/mruby-io/src/io.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/mrbgems/mruby-io/src/file.c b/mrbgems/mruby-io/src/file.c index d4f2b24e4..d6db8140c 100644 --- a/mrbgems/mruby-io/src/file.c +++ b/mrbgems/mruby-io/src/file.c @@ -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 diff --git a/mrbgems/mruby-io/src/io.c b/mrbgems/mruby-io/src/io.c index 0ee68b725..05eda4ad5 100644 --- a/mrbgems/mruby-io/src/io.c +++ b/mrbgems/mruby-io/src/io.c @@ -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 |
