diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-10 04:24:10 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-10 04:24:10 +0000 |
commit | 228fc417ceb7d2618b125e10c6d15fd588297895 (patch) | |
tree | 3207991cf9949b0acf114a198f85d63855f58513 /ext | |
parent | 9d7a5a493f941b1698242e7706631169b4783495 (diff) | |
download | ruby-228fc417ceb7d2618b125e10c6d15fd588297895.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.c | 2 |
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)); |