Use "$!" specifier of mrb_get_args.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-07-12 14:49:55 +09:00
parent e9b57124a0
commit a18904a4c2
8 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -1597,7 +1597,7 @@ mrb_str_index(mrb_state *mrb, mrb_value str)
mrb_value sub;
mrb_int pos, clen;
mrb_get_args(mrb, "*", &argv, &argc);
mrb_get_args(mrb, "*!", &argv, &argc);
if (argc == 2) {
mrb_get_args(mrb, "oi", &sub, &pos);
}
@@ -1868,7 +1868,7 @@ mrb_str_rindex(mrb_state *mrb, mrb_value str)
mrb_value sub;
mrb_int pos, len = RSTRING_CHAR_LEN(str);
mrb_get_args(mrb, "*", &argv, &argc);
mrb_get_args(mrb, "*!", &argv, &argc);
if (argc == 2) {
mrb_get_args(mrb, "oi", &sub, &pos);
if (pos < 0) {