aboutsummaryrefslogtreecommitdiffstats
path: root/vm_args.c
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2023-07-13 09:45:35 -0400
committerPeter Zhu <peter@peterzhu.ca>2023-07-13 14:48:14 -0400
commit32231812845e5302bd457f7e4a534e7965d89d49 (patch)
tree8e60caac12626d657aab821b1cde8493baca4f1d /vm_args.c
parentde327ccb63db9f929949a499476647f8def84be2 (diff)
downloadruby-32231812845e5302bd457f7e4a534e7965d89d49.tar.gz
Remove RARRAY_CONST_PTR_TRANSIENT
RARRAY_CONST_PTR now does the same things as RARRAY_CONST_PTR_TRANSIENT.
Diffstat (limited to 'vm_args.c')
-rw-r--r--vm_args.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vm_args.c b/vm_args.c
index 6832849e1e..677f37c55a 100644
--- a/vm_args.c
+++ b/vm_args.c
@@ -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];