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-string-ext/src/string.c | |
| 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-string-ext/src/string.c')
| -rw-r--r-- | mrbgems/mruby-string-ext/src/string.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mrbgems/mruby-string-ext/src/string.c b/mrbgems/mruby-string-ext/src/string.c index 4b8f99597..09cbf7995 100644 --- a/mrbgems/mruby-string-ext/src/string.c +++ b/mrbgems/mruby-string-ext/src/string.c @@ -194,7 +194,8 @@ mrb_str_concat_m(mrb_state *mrb, mrb_value self) static mrb_value mrb_str_start_with(mrb_state *mrb, mrb_value self) { - mrb_value *argv, sub; + const mrb_value *argv; + mrb_value sub; mrb_int argc, i; mrb_get_args(mrb, "*", &argv, &argc); @@ -223,7 +224,8 @@ mrb_str_start_with(mrb_state *mrb, mrb_value self) static mrb_value mrb_str_end_with(mrb_state *mrb, mrb_value self) { - mrb_value *argv, sub; + const mrb_value *argv; + mrb_value sub; mrb_int argc, i; mrb_get_args(mrb, "*", &argv, &argc); |
