From 48c5321dca85025b8b11e43c8db2726fccb45b9d Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Fri, 12 Sep 2014 12:42:39 +0900 Subject: constify pointer from RARRAY_PTR to detect potential write barrier bugs. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/array.c') diff --git a/src/array.c b/src/array.c index 55e03c8ac..21c7e5d86 100644 --- a/src/array.c +++ b/src/array.c @@ -574,7 +574,7 @@ mrb_ary_splice(mrb_state *mrb, mrb_value ary, mrb_int head, mrb_int len, mrb_val { struct RArray *a = mrb_ary_ptr(ary); mrb_int tail, size; - mrb_value *argv; + const mrb_value *argv; mrb_int i, argc; ary_modify(mrb, a); -- cgit v1.2.3