ruby-changes:48427
From: ko1 <ko1@a...>
Date: Sun, 29 Oct 2017 22:20:48 +0900 (JST)
Subject: [ruby-changes:48427] ko1:r60541 (trunk): use `GET_EC()` directly.
ko1 2017-10-29 22:20:44 +0900 (Sun, 29 Oct 2017) New Revision: 60541 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60541 Log: use `GET_EC()` directly. Modified files: trunk/gc.c Index: gc.c =================================================================== --- gc.c (revision 60540) +++ gc.c (revision 60541) @@ -2795,19 +2795,19 @@ run_finalizer(rb_objspace_t *objspace, V https://github.com/ruby/ruby/blob/trunk/gc.c#L2795 long finished; int safe; } saved; - rb_thread_t *const volatile th = GET_THREAD(); + rb_execution_context_t * volatile ec = GET_EC(); #define RESTORE_FINALIZER() (\ - th->ec->cfp = saved.cfp, \ + ec->cfp = saved.cfp, \ rb_set_safe_level_force(saved.safe), \ rb_set_errinfo(saved.errinfo)) saved.safe = rb_safe_level(); saved.errinfo = rb_errinfo(); saved.objid = nonspecial_obj_id(obj); - saved.cfp = th->ec->cfp; + saved.cfp = ec->cfp; saved.finished = 0; - EC_PUSH_TAG(th->ec); + EC_PUSH_TAG(ec); state = EC_EXEC_TAG(); if (state != TAG_NONE) { ++saved.finished; /* skip failed finalizer */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/