diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-13 09:56:22 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-13 09:56:22 +0000 |
commit | aacd7710462142df7397618ffff4279e495f10f9 (patch) | |
tree | 6611fdbf0f66b471386ad19d7854275c583b8914 /file.c | |
parent | 12bf73637b960cf0ef463f966554595ff2c37ecd (diff) | |
download | ruby-aacd7710462142df7397618ffff4279e495f10f9.tar.gz |
* *.c, parse.y, insns.def: use RARRAY_AREF/ASET macro
instead of using RARRAY_PTR().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -252,7 +252,7 @@ apply2files(void (*func)(const char *, VALUE, void *), VALUE vargs, void *arg) rb_secure(4); for (i=0; i<RARRAY_LEN(vargs); i++) { const char *s; - path = rb_get_path(RARRAY_PTR(vargs)[i]); + path = rb_get_path(RARRAY_AREF(vargs, i)); path = rb_str_encode_ospath(path); s = RSTRING_PTR(path); (*func)(s, path, arg); @@ -3999,7 +3999,7 @@ rb_file_join(VALUE ary, VALUE sep) len = 1; for (i=0; i<RARRAY_LEN(ary); i++) { - tmp = RARRAY_PTR(ary)[i]; + tmp = RARRAY_AREF(ary, i); if (RB_TYPE_P(tmp, T_STRING)) { check_path_encoding(tmp); len += RSTRING_LEN(tmp); @@ -4016,7 +4016,7 @@ rb_file_join(VALUE ary, VALUE sep) RBASIC(result)->klass = 0; OBJ_INFECT(result, ary); for (i=0; i<RARRAY_LEN(ary); i++) { - tmp = RARRAY_PTR(ary)[i]; + tmp = RARRAY_AREF(ary, i); switch (TYPE(tmp)) { case T_STRING: if (!checked) check_path_encoding(tmp); @@ -5367,7 +5367,7 @@ rb_find_file_ext_safe(VALUE *filep, const char *const *ext, int safe_level) for (j=0; ext[j]; j++) { rb_str_cat2(fname, ext[j]); for (i = 0; i < RARRAY_LEN(load_path); i++) { - VALUE str = RARRAY_PTR(load_path)[i]; + VALUE str = RARRAY_AREF(load_path, i); RB_GC_GUARD(str) = rb_get_path_check(str, safe_level); if (RSTRING_LEN(str) == 0) continue; @@ -5428,7 +5428,7 @@ rb_find_file_safe(VALUE path, int safe_level) tmp = rb_str_tmp_new(MAXPATHLEN + 2); rb_enc_associate_index(tmp, rb_usascii_encindex()); for (i = 0; i < RARRAY_LEN(load_path); i++) { - VALUE str = RARRAY_PTR(load_path)[i]; + VALUE str = RARRAY_AREF(load_path, i); RB_GC_GUARD(str) = rb_get_path_check(str, safe_level); if (RSTRING_LEN(str) > 0) { rb_file_expand_path_internal(path, str, 0, 0, tmp); |