Commit 9f6ba4bf authored by dearblue's avatar dearblue

Keep the type of `posarg` consistent

Match the type with the caller and related functions.
parent 3c1a2612
...@@ -155,17 +155,17 @@ check_next_arg(mrb_state *mrb, int posarg, int nextarg) ...@@ -155,17 +155,17 @@ check_next_arg(mrb_state *mrb, int posarg, int nextarg)
} }
static void static void
check_pos_arg(mrb_state *mrb, mrb_int posarg, mrb_int n) check_pos_arg(mrb_state *mrb, int posarg, mrb_int n)
{ {
if (posarg > 0) { if (posarg > 0) {
mrb_raisef(mrb, E_ARGUMENT_ERROR, "numbered(%i) after unnumbered(%i)", mrb_raisef(mrb, E_ARGUMENT_ERROR, "numbered(%d) after unnumbered(%d)",
n, posarg); n, posarg);
} }
if (posarg == -2) { if (posarg == -2) {
mrb_raisef(mrb, E_ARGUMENT_ERROR, "numbered(%i) after named", n); mrb_raisef(mrb, E_ARGUMENT_ERROR, "numbered(%d) after named", n);
} }
if (n < 1) { if (n < 1) {
mrb_raisef(mrb, E_ARGUMENT_ERROR, "invalid index - %i$", n); mrb_raisef(mrb, E_ARGUMENT_ERROR, "invalid index - %d$", n);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment