summaryrefslogtreecommitdiff
path: root/cont.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-06 10:19:55 (GMT)
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-06 10:19:55 (GMT)
commit5fcc43e2d3e51da520ccc6c2d09c7a52e2bd87f8 (patch)
treec2cff853754f8762c9e3f1d242bd422aa3726b98 /cont.c
parent4a80c0540f0f9b3303919ee7209eedfac856a1af (diff)
cont.c: direct use of rb_thread_t
The only usage of rb_fiber_reset_root_local_storage() is from ruby_vm_destruct(), where the object space is already terminated. This `th->self` is not alive. Why not just use `th` itself. See also: https://travis-ci.org/ruby/ruby/jobs/451294954 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/cont.c b/cont.c
index 95f2de9..7a24ec5 100644
--- a/cont.c
+++ b/cont.c
@@ -1833,10 +1833,8 @@ rb_fiber_yield(int argc, const VALUE *argv)
}
void
-rb_fiber_reset_root_local_storage(VALUE thval)
+rb_fiber_reset_root_local_storage(rb_thread_t *th)
{
- rb_thread_t *th = rb_thread_ptr(thval);
-
if (th->root_fiber && th->root_fiber != th->ec->fiber_ptr) {
th->ec->local_storage = th->root_fiber->cont.saved_ec.local_storage;
}