From edc49f9d2624fa39780ae917053e2bc12fdf1875 Mon Sep 17 00:00:00 2001 From: dearblue Date: Thu, 22 Oct 2020 23:22:29 +0900 Subject: Prohibit array changes by `mrb_get_argv()` The `mrb_get_argv()` function will now return `const mrb_value *`. This is because it is difficult for the caller to check if it is a splat argument (array object) and to write-barrier if necessary. --- include/mruby.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/mruby.h') diff --git a/include/mruby.h b/include/mruby.h index 52bcd58bf..c463a47db 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -991,7 +991,7 @@ MRB_API mrb_int mrb_get_argc(mrb_state *mrb); * * Correctly handles *splat arguments. */ -MRB_API mrb_value* mrb_get_argv(mrb_state *mrb); +MRB_API const mrb_value *mrb_get_argv(mrb_state *mrb); /** * Retrieve the first and only argument from mrb_state. -- cgit v1.2.3