summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authordearblue <[email protected]>2020-10-22 23:22:29 +0900
committerdearblue <[email protected]>2020-10-22 23:22:29 +0900
commitedc49f9d2624fa39780ae917053e2bc12fdf1875 (patch)
tree5c6a382477e85a2e6010f5aafc80802d88ae9693 /include
parent27492e53a0440aee7c411d5e72b6f092cf85d6a1 (diff)
downloadmruby-edc49f9d2624fa39780ae917053e2bc12fdf1875.tar.gz
mruby-edc49f9d2624fa39780ae917053e2bc12fdf1875.zip
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.
Diffstat (limited to 'include')
-rw-r--r--include/mruby.h2
1 files changed, 1 insertions, 1 deletions
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.