include/mruby/array.h: `ARY_LEN()` should return `mrb_int`.

It used to return `mrb_ssize` but its size may differ from `mrb_int`,
e.g. `MRB_INT64` on `MRB_32BIT` architecture.
parent 31051fd6
......@@ -65,7 +65,7 @@ struct RArray {
#define ARY_EMBED_PTR(a) ((a)->as.ary)
#endif
#define ARY_LEN(a) (ARY_EMBED_P(a)?ARY_EMBED_LEN(a):(a)->as.heap.len)
#define ARY_LEN(a) (ARY_EMBED_P(a)?ARY_EMBED_LEN(a):(mrb_int)(a)->as.heap.len)
#define ARY_PTR(a) (ARY_EMBED_P(a)?ARY_EMBED_PTR(a):(a)->as.heap.ptr)
#define RARRAY_LEN(a) ARY_LEN(RARRAY(a))
#define RARRAY_PTR(a) ARY_PTR(RARRAY(a))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment