From 228fc417ceb7d2618b125e10c6d15fd588297895 Mon Sep 17 00:00:00 2001 From: ko1 Date: Wed, 10 Oct 2018 04:24:10 +0000 Subject: [PATCH] revisit `RARRAY_PTR()`. * ext/fiddle/function.c (initialize): use RARRAY_AREF() instead of using RARRAY_PTR(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/fiddle/function.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/fiddle/function.c b/ext/fiddle/function.c index 937b96c647..45bcb50cdd 100644 --- a/ext/fiddle/function.c +++ b/ext/fiddle/function.c @@ -113,7 +113,7 @@ initialize(int argc, VALUE argv[], VALUE self) Check_Max_Args("args", len); ary = rb_ary_subseq(args, 0, len); for (i = 0; i < RARRAY_LEN(args); i++) { - VALUE a = RARRAY_PTR(args)[i]; + VALUE a = RARRAY_AREF(args, i); int type = NUM2INT(a); (void)INT2FFI_TYPE(type); /* raise */ if (INT2FIX(type) != a) rb_ary_store(ary, i, INT2FIX(type));