summaryrefslogtreecommitdiff
path: root/vm_insnhelper.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 /vm_insnhelper.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 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 729e6a4990..96b624d014 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -792,7 +792,7 @@ vm_expandarray(rb_control_frame_t *cfp, VALUE ary, rb_num_t num, int flag)
cfp->sp += space_size;
- ptr = RARRAY_RAWPTR(ary);
+ ptr = RARRAY_CONST_PTR(ary);
len = (rb_num_t)RARRAY_LEN(ary);
if (flag & 0x02) {
@@ -1068,7 +1068,7 @@ vm_caller_setup_args(const rb_thread_t *th, rb_control_frame_t *cfp, rb_call_inf
}
else {
long len = RARRAY_LEN(tmp);
- ptr = RARRAY_RAWPTR(tmp);
+ ptr = RARRAY_CONST_PTR(tmp);
cfp->sp -= 1;
CHECK_VM_STACK_OVERFLOW(cfp, len);
@@ -2244,7 +2244,7 @@ vm_yield_setup_block_args(rb_thread_t *th, const rb_iseq_t * iseq,
CHECK_VM_STACK_OVERFLOW(th->cfp, argc);
- MEMCPY(argv, RARRAY_RAWPTR(ary), VALUE, argc);
+ MEMCPY(argv, RARRAY_CONST_PTR(ary), VALUE, argc);
}
else {
/* vm_push_frame current argv is at the top of sp because vm_invoke_block