Keep the type of `posarg` consistent
Match the type with the caller and related functions.
@@ -155,17 +155,17 @@ check_next_arg(mrb_state *mrb, int posarg, int nextarg)
}
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) {
- mrb_raisef(mrb, E_ARGUMENT_ERROR, "numbered(%i) after unnumbered(%i)",
+ mrb_raisef(mrb, E_ARGUMENT_ERROR, "numbered(%d) after unnumbered(%d)",
n, posarg);
}
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) {
- mrb_raisef(mrb, E_ARGUMENT_ERROR, "invalid index - %i$", n);
+ mrb_raisef(mrb, E_ARGUMENT_ERROR, "invalid index - %d$", n);
}
}
