summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-struct
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2018-11-19 12:01:58 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2018-11-19 12:08:28 +0900
commit9516731329a9d43b4aab57a19fb9cfc1b62f11e8 (patch)
tree38ca7a71cc958792b2fd9df30ca62dfa577ae386 /mrbgems/mruby-struct
parentc022e4643f2b6c84cb3f1ca716c0e7da3f14c8ca (diff)
downloadmruby-9516731329a9d43b4aab57a19fb9cfc1b62f11e8.tar.gz
mruby-9516731329a9d43b4aab57a19fb9cfc1b62f11e8.zip
Use type checking `mrb_to_str` instead of converting `mrb_str_to_str`.
Diffstat (limited to 'mrbgems/mruby-struct')
-rw-r--r--mrbgems/mruby-struct/src/struct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-struct/src/struct.c b/mrbgems/mruby-struct/src/struct.c
index b567a00d5..832583f35 100644
--- a/mrbgems/mruby-struct/src/struct.c
+++ b/mrbgems/mruby-struct/src/struct.c
@@ -213,7 +213,7 @@ make_struct(mrb_state *mrb, mrb_value name, mrb_value members, struct RClass *kl
}
else {
/* old style: should we warn? */
- name = mrb_str_to_str(mrb, name);
+ mrb_to_str(mrb, name);
id = mrb_obj_to_sym(mrb, name);
if (!is_const_id(mrb, mrb_sym2name_len(mrb, id, NULL))) {
mrb_name_error(mrb, id, "identifier %S needs to be constant", name);