mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-pack/pack.c (mrb_pack_pack): use direct array buffer access
We don't need index wrap-around not boundary check here, so we can use faster direct array access.
This commit is contained in:
@@ -1421,7 +1421,7 @@ mrb_pack_pack(mrb_state *mrb, mrb_value ary)
|
||||
if (count == 0 && !(flags & PACK_FLAG_WIDTH))
|
||||
break;
|
||||
|
||||
o = mrb_ary_ref(mrb, ary, aidx);
|
||||
o = RARRAY_PTR(ary)[aidx];
|
||||
if (type == PACK_TYPE_INTEGER) {
|
||||
o = mrb_ensure_int_type(mrb, o);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user