summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-25 08:24:34 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-25 08:24:34 +0000
commitdc626dbab3caaf221c9c7b88a5500ae878615712 (patch)
tree99208866566aa5511f0fa3d9863f5c0a32e75d7d /compile.c
parentd700d340437a4cfba215e51b9045460900c62c3a (diff)
* include/ruby/ruby.h: rename RARRAY_RAWPTR() to RARRAY_CONST_PTR().
RARRAY_RAWPTR(ary) returns (const VALUE *) type pointer and usecase of this macro is not acquire raw pointer, but acquire read-only pointer. So we rename to better name. RSTRUCT_RAWPTR() is also renamed to RSTRUCT_CONST_PTR() (I expect that nobody use it). * array.c, compile.c, cont.c, enumerator.c, gc.c, proc.c, random.c, string.c, struct.c, thread.c, vm_eval.c, vm_insnhelper.c: catch up this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/compile.c b/compile.c
index 418ba5e6c4..2285d28805 100644
--- a/compile.c
+++ b/compile.c
@@ -1174,7 +1174,7 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_args)
iseq->arg_opts = i;
iseq->arg_opt_table = ALLOC_N(VALUE, i);
- MEMCPY(iseq->arg_opt_table, RARRAY_RAWPTR(labels), VALUE, i);
+ MEMCPY(iseq->arg_opt_table, RARRAY_CONST_PTR(labels), VALUE, i);
for (j = 0; j < i; j++) {
iseq->arg_opt_table[j] &= ~1;
}
@@ -1675,13 +1675,13 @@ iseq_set_exception_table(rb_iseq_t *iseq)
struct iseq_catch_table_entry *entry;
tlen = (int)RARRAY_LEN(iseq->compile_data->catch_table_ary);
- tptr = RARRAY_RAWPTR(iseq->compile_data->catch_table_ary);
+ tptr = RARRAY_CONST_PTR(iseq->compile_data->catch_table_ary);
iseq->catch_table = tlen ? ALLOC_N(struct iseq_catch_table_entry, tlen) : 0;
iseq->catch_table_size = tlen;
for (i = 0; i < tlen; i++) {
- ptr = RARRAY_RAWPTR(tptr[i]);
+ ptr = RARRAY_CONST_PTR(tptr[i]);
entry = &iseq->catch_table[i];
entry->type = (enum catch_type)(ptr[0] & 0xffff);
entry->start = label_get_position((LABEL *)(ptr[1] & ~1));