mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Remove unnecessary inline function ary_elt.
And the function does not conform the naming convention anyway.
This commit is contained in:
+4
-1
@@ -1074,7 +1074,10 @@ mrb_ary_entry(mrb_value ary, mrb_int offset)
|
||||
if (offset < 0) {
|
||||
offset += RARRAY_LEN(ary);
|
||||
}
|
||||
return ary_elt(ary, offset);
|
||||
if (offset < 0 || RARRAY_LEN(ary) <= offset) {
|
||||
return mrb_nil_value();
|
||||
}
|
||||
return RARRAY_PTR(ary)[offset];
|
||||
}
|
||||
|
||||
static mrb_value
|
||||
|
||||
Reference in New Issue
Block a user