From f0a64329b1cb8156e0d525d003e5d6ff03b7832f Mon Sep 17 00:00:00 2001 From: dearblue Date: Thu, 22 Oct 2020 22:55:35 +0900 Subject: Prohibit array changes by "a"/"*" specifier of `mrb_get_args()` The "a"/"*" specifier of the `mrb_get_args()` function will now return `const mrb_value *`. This is because it is difficult for the caller to check if it is an array object and write-barrier if necessary. And it requires calling `mrb_ary_modify()` on the unmodified array object, which is also difficult (this is similar to #5087). --- mrbgems/mruby-eval/src/eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mrbgems/mruby-eval') diff --git a/mrbgems/mruby-eval/src/eval.c b/mrbgems/mruby-eval/src/eval.c index 34a438060..61b33f6e1 100644 --- a/mrbgems/mruby-eval/src/eval.c +++ b/mrbgems/mruby-eval/src/eval.c @@ -149,7 +149,7 @@ static mrb_value f_instance_eval(mrb_state *mrb, mrb_value self) { mrb_value b; - mrb_int argc; mrb_value *argv; + mrb_int argc; const mrb_value *argv; mrb_get_args(mrb, "*!&", &argv, &argc, &b); -- cgit v1.2.3