diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-10 18:39:46 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-10 18:39:46 +0000 |
commit | 46cdb8f18766383a9e11b5a6e9a0c010e7e8653a (patch) | |
tree | db3496b8d312e6a7123f176591262e10dc9c3a1a /eval.c | |
parent | 9d937bb08640107e13a3f6afece074c753afd974 (diff) |
* 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
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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]; } |