From 46cdb8f18766383a9e11b5a6e9a0c010e7e8653a Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 10 Mar 2015 18:39:46 +0000 Subject: * vm_insnhelper.h: define struct THROW_DATA to represent throwing data. Also define accessor functions. * eval_intern.h: move related changes into vm_insnhelper.h. Now these MACROs (functions) are only used in vm*.c. There is only THROW_DATA_P(err) to check this data type or not. * vm.c: catch up these changes. * vm_eval.c: ditto. * vm_insnhelper.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 1ca414a704..20c69db1b6 100644 --- a/eval.c +++ b/eval.c @@ -215,7 +215,7 @@ ruby_cleanup(volatile int ex) if (!RTEST(err)) continue; /* th->errinfo contains a NODE while break'ing */ - if (RB_TYPE_P(err, T_NODE)) continue; + if (THROW_DATA_P(err)) continue; if (rb_obj_is_kind_of(err, rb_eSystemExit)) { ex = sysexit_status(err); @@ -1508,7 +1508,7 @@ errinfo_place(rb_thread_t *th) return &cfp->ep[-2]; } else if (cfp->iseq->type == ISEQ_TYPE_ENSURE && - !RB_TYPE_P(cfp->ep[-2], T_NODE) && + !THROW_DATA_P(cfp->ep[-2]) && !FIXNUM_P(cfp->ep[-2])) { return &cfp->ep[-2]; } -- cgit v1.2.3