diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-02-26 15:05:55 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-02-26 15:05:55 +0900 |
| commit | 5d371604557c7f0c006334c1383c5f8fe84ae38a (patch) | |
| tree | bca486cb271e8f8e499d0bd67d6cc83716958b7a /mrbgems/mruby-io | |
| parent | 192f3df9a1fca043801e42febcd4b105fa1d5733 (diff) | |
| download | mruby-5d371604557c7f0c006334c1383c5f8fe84ae38a.tar.gz mruby-5d371604557c7f0c006334c1383c5f8fe84ae38a.zip | |
Use `MRB_SYM()` more extensively.
Diffstat (limited to 'mrbgems/mruby-io')
| -rw-r--r-- | mrbgems/mruby-io/include/mruby/ext/io.h | 4 | ||||
| -rw-r--r-- | mrbgems/mruby-io/src/file.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/mrbgems/mruby-io/include/mruby/ext/io.h b/mrbgems/mruby-io/include/mruby/ext/io.h index 340b20562..714f58fd1 100644 --- a/mrbgems/mruby-io/include/mruby/ext/io.h +++ b/mrbgems/mruby-io/include/mruby/ext/io.h @@ -59,8 +59,8 @@ struct mrb_io { #define MRB_O_READABLE_P(f) ((mrb_bool)((((f) & MRB_O_ACCMODE) | 2) == 2)) #define MRB_O_WRITABLE_P(f) ((mrb_bool)(((((f) & MRB_O_ACCMODE) + 1) & 2) == 2)) -#define E_IO_ERROR (mrb_class_get(mrb, "IOError")) -#define E_EOF_ERROR (mrb_class_get(mrb, "EOFError")) +#define E_IO_ERROR (mrb_exc_get(mrb, "IOError")) +#define E_EOF_ERROR (mrb_exc_get(mrb, "EOFError")) int mrb_io_fileno(mrb_state *mrb, mrb_value io); diff --git a/mrbgems/mruby-io/src/file.c b/mrbgems/mruby-io/src/file.c index 8e7d64958..03a6a070d 100644 --- a/mrbgems/mruby-io/src/file.c +++ b/mrbgems/mruby-io/src/file.c @@ -593,7 +593,7 @@ mrb_init_file(mrb_state *mrb) { struct RClass *io, *file, *cnst; - io = mrb_class_get(mrb, "IO"); + io = mrb_class_get_id(mrb, MRB_SYM(IO)); file = mrb_define_class(mrb, "File", io); MRB_SET_INSTANCE_TT(file, MRB_TT_DATA); mrb_define_class_method(mrb, file, "umask", mrb_file_s_umask, MRB_ARGS_OPT(1)); |
