diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-23 15:43:18 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-10-23 15:43:18 +0900 |
| commit | 17247c51f2e713b89d84ea329bae83b71f14a431 (patch) | |
| tree | e69229c79156bb32e1cfa084b1a063e38c65116d /mrbgems/mruby-struct/src | |
| parent | fd38b9217dbb1b4357d8973848babd7ba3f25696 (diff) | |
| parent | f0a64329b1cb8156e0d525d003e5d6ff03b7832f (diff) | |
| download | mruby-17247c51f2e713b89d84ea329bae83b71f14a431.tar.gz mruby-17247c51f2e713b89d84ea329bae83b71f14a431.zip | |
Merge pull request #5099 from dearblue/getargs-array
Prohibit array changes by "a"/"*" specifier of `mrb_get_args()`
Diffstat (limited to 'mrbgems/mruby-struct/src')
| -rw-r--r-- | mrbgems/mruby-struct/src/struct.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mrbgems/mruby-struct/src/struct.c b/mrbgems/mruby-struct/src/struct.c index 7c6f50090..c64a494a5 100644 --- a/mrbgems/mruby-struct/src/struct.c +++ b/mrbgems/mruby-struct/src/struct.c @@ -262,12 +262,12 @@ static mrb_value mrb_struct_s_def(mrb_state *mrb, mrb_value klass) { mrb_value name, rest; - mrb_value *pargv; + const mrb_value *pargv; mrb_int argcnt; mrb_int i; mrb_value b, st; mrb_sym id; - mrb_value *argv; + const mrb_value *argv; mrb_int argc; name = mrb_nil_value(); @@ -321,7 +321,7 @@ num_members(mrb_state *mrb, struct RClass *klass) /* */ static mrb_value -mrb_struct_initialize_withArg(mrb_state *mrb, mrb_int argc, mrb_value *argv, mrb_value self) +mrb_struct_initialize_withArg(mrb_state *mrb, mrb_int argc, const mrb_value *argv, mrb_value self) { struct RClass *klass = mrb_obj_class(mrb, self); mrb_int i, n; @@ -343,7 +343,7 @@ mrb_struct_initialize_withArg(mrb_state *mrb, mrb_int argc, mrb_value *argv, mrb static mrb_value mrb_struct_initialize(mrb_state *mrb, mrb_value self) { - mrb_value *argv; + const mrb_value *argv; mrb_int argc; mrb_get_args(mrb, "*!", &argv, &argc); @@ -646,7 +646,7 @@ static mrb_value mrb_struct_values_at(mrb_state *mrb, mrb_value self) { mrb_int argc; - mrb_value *argv; + const mrb_value *argv; mrb_get_args(mrb, "*", &argv, &argc); |
