summaryrefslogtreecommitdiff
path: root/thread.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 /thread.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 'thread.c')
-rw-r--r--thread.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/thread.c b/thread.c
index c2f6678b7b..ea11ee064c 100644
--- a/thread.c
+++ b/thread.c
@@ -528,7 +528,7 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s
th->root_lep = rb_vm_ep_local_ep(proc->block.ep);
th->root_svar = Qnil;
EXEC_EVENT_HOOK(th, RUBY_EVENT_THREAD_BEGIN, th->self, 0, 0, Qundef);
- th->value = rb_vm_invoke_proc(th, proc, (int)RARRAY_LEN(args), RARRAY_RAWPTR(args), 0);
+ th->value = rb_vm_invoke_proc(th, proc, (int)RARRAY_LEN(args), RARRAY_CONST_PTR(args), 0);
EXEC_EVENT_HOOK(th, RUBY_EVENT_THREAD_END, th->self, 0, 0, Qundef);
}
else {
@@ -1545,10 +1545,10 @@ rb_threadptr_pending_interrupt_check_mask(rb_thread_t *th, VALUE err)
{
VALUE mask;
long mask_stack_len = RARRAY_LEN(th->pending_interrupt_mask_stack);
- const VALUE *mask_stack = RARRAY_RAWPTR(th->pending_interrupt_mask_stack);
+ const VALUE *mask_stack = RARRAY_CONST_PTR(th->pending_interrupt_mask_stack);
VALUE ancestors = rb_mod_ancestors(err); /* TODO: GC guard */
long ancestors_len = RARRAY_LEN(ancestors);
- const VALUE *ancestors_ptr = RARRAY_RAWPTR(ancestors);
+ const VALUE *ancestors_ptr = RARRAY_CONST_PTR(ancestors);
int i, j;
for (i=0; i<mask_stack_len; i++) {