summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-13 09:56:22 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-13 09:56:22 +0000
commitaacd7710462142df7397618ffff4279e495f10f9 (patch)
tree6611fdbf0f66b471386ad19d7854275c583b8914 /load.c
parent12bf73637b960cf0ef463f966554595ff2c37ecd (diff)
* *.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 'load.c')
-rw-r--r--load.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/load.c b/load.c
index dab493d..c478f09 100644
--- a/load.c
+++ b/load.c
@@ -63,7 +63,7 @@ rb_construct_expanded_load_path(int type, int *has_relative, int *has_non_cache)
VALUE path, as_str, expanded_path;
int is_string, non_cache;
char *as_cstr;
- as_str = path = RARRAY_PTR(load_path)[i];
+ as_str = path = RARRAY_AREF(load_path, i);
is_string = RB_TYPE_P(path, T_STRING) ? 1 : 0;
non_cache = !is_string ? 1 : 0;
as_str = rb_get_path_check_to_string(path, level);
@@ -76,7 +76,7 @@ rb_construct_expanded_load_path(int type, int *has_relative, int *has_non_cache)
(!as_cstr[0] || as_cstr[0] != '~')) ||
(type == EXPAND_NON_CACHE)) {
/* Use cached expanded path. */
- rb_ary_push(ary, RARRAY_PTR(expanded_load_path)[i]);
+ rb_ary_push(ary, RARRAY_AREF(expanded_load_path, i));
continue;
}
}
@@ -337,7 +337,7 @@ loaded_feature_path(const char *name, long vlen, const char *feature, long len,
(possibly empty) and prefix is some string of length plen. */
for (i = 0; i < RARRAY_LEN(load_path); ++i) {
- VALUE p = RARRAY_PTR(load_path)[i];
+ VALUE p = RARRAY_AREF(load_path, i);
const char *s = StringValuePtr(p);
long n = RSTRING_LEN(p);
@@ -425,7 +425,7 @@ rb_feature_p(const char *feature, const char *ext, int rb, int expanded, const c
long index;
if (RB_TYPE_P(this_feature_index, T_ARRAY)) {
if (i >= RARRAY_LEN(this_feature_index)) break;
- entry = RARRAY_PTR(this_feature_index)[i];
+ entry = RARRAY_AREF(this_feature_index, i);
}
else {
if (i > 0) break;
@@ -433,7 +433,7 @@ rb_feature_p(const char *feature, const char *ext, int rb, int expanded, const c
}
index = FIX2LONG(entry);
- v = RARRAY_PTR(features)[index];
+ v = RARRAY_AREF(features, index);
f = StringValuePtr(v);
if ((n = RSTRING_LEN(v)) < len) continue;
if (strncmp(f, feature, len) != 0) {