mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
use GET_EC()
directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e80ef4e6ce
commit
cb81d0ecb1
1 changed files with 4 additions and 4 deletions
8
gc.c
8
gc.c
|
@ -2795,19 +2795,19 @@ run_finalizer(rb_objspace_t *objspace, VALUE obj, VALUE table)
|
|||
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 */
|
||||
|
|
Loading…
Add table
Reference in a new issue