aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-10 04:24:10 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-10 04:24:10 +0000
commitc088f3d7f26065a502861d6bcf4d2c8fec2f6f1e (patch)
tree3207991cf9949b0acf114a198f85d63855f58513 /ext
parentaf20ac69b0b7b5aaa23822926e614e2fb0f48440 (diff)
downloadruby-c088f3d7f26065a502861d6bcf4d2c8fec2f6f1e.tar.gz
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
Diffstat (limited to 'ext')
-rw-r--r--ext/fiddle/function.c2
1 files changed, 1 insertions, 1 deletions
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));