if you see compiler errors due to this commit, you'd better to use array-modifying
functions, e.g. mrb_ary_set() or mrb_ary_push(), otherwise you might see nasty
GC bugs in the future. if you are sure what you are doing, replace `RARRAY_PTR(ary)`
by `mrb_ary_ptr(ary)->ptr`. but be warned.
src/array.c:
- make various functions without declaration in the mruby headers static
- removed all uncessary int casts and two useless comments
mrb_ary_new_from_values: move to similar functions
mrb_check_array_type: fix indentation
include/mruby/array.h:
mrb_shared_array: padding (default "mrbconf.h" on an usual 64-bit system)
sizeof(mrb_int)==sizeof(int)==4 && sizeof(mrb_value*)==8
both:
mrb_ary_aget: remove declaration in header and make static
nobody uses it which is not surprising since it has 1 req arg!
mrb_assoc_new: small optimization and move to similar functions
mrb_ary_len: re-implement as static inline function (it is used by mrbgems)
programmers should directly use RARRAY_LEN instead