mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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.
This commit is contained in:
+1
-1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user