summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-28 04:49:30 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-28 04:49:30 +0000
commit249790802db62ff22c79830d4054c449fa3c243b (patch)
treec0ee96bf9da5df9607397c841b2b7953a41d4c04 /vm.c
parente42a16190c0c5bbdbe052b62c3a8b67920b3d08f (diff)
introduce rb_thread_ptr() to replace GetThreadPtr().
* vm_core.h (rb_thread_ptr): added to replace GetThreadPtr() macro. * thread.c (in some functions: use "target_th" instead of "th" to make clear that it is not a current thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/vm.c b/vm.c
index 6f1cc71f32..d5382125b8 100644
--- a/vm.c
+++ b/vm.c
@@ -2555,9 +2555,8 @@ th_init(rb_thread_t *th, VALUE self)
static VALUE
ruby_thread_init(VALUE self)
{
- rb_thread_t *th;
+ rb_thread_t *th = rb_thread_ptr(self);
rb_vm_t *vm = GET_THREAD()->vm;
- GetThreadPtr(self, th);
th->vm = vm;
th_init(th, self);