diff options
| author | dearblue <[email protected]> | 2020-10-22 22:55:35 +0900 |
|---|---|---|
| committer | dearblue <[email protected]> | 2020-10-22 22:55:35 +0900 |
| commit | f0a64329b1cb8156e0d525d003e5d6ff03b7832f (patch) | |
| tree | 0f7cfdcfb3af7fb51fcc9e4c60aba736ca10d5d1 /mrbgems/mruby-proc-ext/test | |
| parent | 27492e53a0440aee7c411d5e72b6f092cf85d6a1 (diff) | |
| download | mruby-f0a64329b1cb8156e0d525d003e5d6ff03b7832f.tar.gz mruby-f0a64329b1cb8156e0d525d003e5d6ff03b7832f.zip | |
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).
Diffstat (limited to 'mrbgems/mruby-proc-ext/test')
| -rw-r--r-- | mrbgems/mruby-proc-ext/test/proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-proc-ext/test/proc.c b/mrbgems/mruby-proc-ext/test/proc.c index 7072fe2e9..0253f2b60 100644 --- a/mrbgems/mruby-proc-ext/test/proc.c +++ b/mrbgems/mruby-proc-ext/test/proc.c @@ -35,7 +35,7 @@ static mrb_value cfunc_env_get(mrb_state *mrb, mrb_value self) { mrb_sym n; - mrb_value *argv; mrb_int argc; + const mrb_value *argv; mrb_int argc; mrb_method_t m; struct RProc *p; mrb_get_args(mrb, "na", &n, &argv, &argc); |
