diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-06-01 10:36:28 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-12 16:20:59 +0900 |
| commit | 2a366ffba8397c6f848d659dce76e03e1bf05d17 (patch) | |
| tree | ab3d1e81ebf3659e3f5776729c8ebe1b7cbbee86 /mrbgems/mruby-io/src/io.c | |
| parent | 8864c30d161e627438b86a986c19c048eb31bcb4 (diff) | |
| download | mruby-2a366ffba8397c6f848d659dce76e03e1bf05d17.tar.gz mruby-2a366ffba8397c6f848d659dce76e03e1bf05d17.zip | |
Use functions that take symbols to reduce string litrals in C.
Diffstat (limited to 'mrbgems/mruby-io/src/io.c')
| -rw-r--r-- | mrbgems/mruby-io/src/io.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mrbgems/mruby-io/src/io.c b/mrbgems/mruby-io/src/io.c index 608fc1623..988d19b02 100644 --- a/mrbgems/mruby-io/src/io.c +++ b/mrbgems/mruby-io/src/io.c @@ -102,10 +102,10 @@ io_set_process_status(mrb_state *mrb, pid_t pid, int status) mrb_value v; c_status = NULL; - if (mrb_class_defined(mrb, "Process")) { - c_process = mrb_module_get(mrb, "Process"); - if (mrb_const_defined(mrb, mrb_obj_value(c_process), mrb_intern_cstr(mrb, "Status"))) { - c_status = mrb_class_get_under(mrb, c_process, "Status"); + if (mrb_class_defined_id(mrb, MRB_SYM(Process))) { + c_process = mrb_module_get_id(mrb, MRB_SYM(Process)); + if (mrb_const_defined(mrb, mrb_obj_value(c_process), MRB_SYM(Status))) { + c_status = mrb_class_get_under_id(mrb, c_process, MRB_SYM(Status)); } } if (c_status != NULL) { |
