diff options
author | Peter Zhu <[email protected]> | 2023-07-13 09:45:35 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2023-07-13 14:48:14 -0400 |
commit | 32231812845e5302bd457f7e4a534e7965d89d49 (patch) | |
tree | 8e60caac12626d657aab821b1cde8493baca4f1d /vm_args.c | |
parent | de327ccb63db9f929949a499476647f8def84be2 (diff) |
Remove RARRAY_CONST_PTR_TRANSIENT
RARRAY_CONST_PTR now does the same things as RARRAY_CONST_PTR_TRANSIENT.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/8071
Diffstat (limited to 'vm_args.c')
-rw-r--r-- | vm_args.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -165,7 +165,7 @@ args_copy(struct args_info *args) static inline const VALUE * args_rest_argv(struct args_info *args) { - return RARRAY_CONST_PTR_TRANSIENT(args->rest) + args->rest_index; + return RARRAY_CONST_PTR(args->rest) + args->rest_index; } static inline VALUE @@ -230,7 +230,7 @@ args_setup_post_parameters(struct args_info *args, int argc, VALUE *locals) { long len; len = RARRAY_LEN(args->rest); - MEMCPY(locals, RARRAY_CONST_PTR_TRANSIENT(args->rest) + len - argc, VALUE, argc); + MEMCPY(locals, RARRAY_CONST_PTR(args->rest) + len - argc, VALUE, argc); rb_ary_resize(args->rest, len - argc); } @@ -251,7 +251,7 @@ args_setup_opt_parameters(struct args_info *args, int opt_max, VALUE *locals) if (args->rest) { int len = RARRAY_LENINT(args->rest); - const VALUE *argv = RARRAY_CONST_PTR_TRANSIENT(args->rest); + const VALUE *argv = RARRAY_CONST_PTR(args->rest); for (; i<opt_max && args->rest_index < len; i++, args->rest_index++) { locals[i] = argv[args->rest_index]; |