mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
array.c: avoid slower mrb_get_args() if possible
This commit is contained in:
@@ -89,8 +89,7 @@ mrb_ary_rassoc(mrb_state *mrb, mrb_value ary)
|
||||
static mrb_value
|
||||
mrb_ary_at(mrb_state *mrb, mrb_value ary)
|
||||
{
|
||||
mrb_int pos;
|
||||
mrb_get_args(mrb, "i", &pos);
|
||||
mrb_int pos = mrb_as_int(mrb, mrb_get_arg1(mrb));
|
||||
|
||||
return mrb_ary_entry(ary, pos);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user