mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
insert assertions for THROW_DATA_* macros.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7519688ed8
commit
a0035eb620
1 changed files with 5 additions and 0 deletions
|
@ -199,18 +199,21 @@ THROW_DATA_NEW(VALUE val, const rb_control_frame_t *cf, VALUE st)
|
|||
static inline VALUE
|
||||
THROW_DATA_VAL(const struct vm_throw_data *obj)
|
||||
{
|
||||
VM_ASSERT(THROW_DATA_P(obj));
|
||||
return obj->throw_obj;
|
||||
}
|
||||
|
||||
static inline const rb_control_frame_t *
|
||||
THROW_DATA_CATCH_FRAME(const struct vm_throw_data *obj)
|
||||
{
|
||||
VM_ASSERT(THROW_DATA_P(obj));
|
||||
return obj->catch_frame;
|
||||
}
|
||||
|
||||
static inline int
|
||||
THROW_DATA_STATE(const struct vm_throw_data *obj)
|
||||
{
|
||||
VM_ASSERT(THROW_DATA_P(obj));
|
||||
return (int)obj->throw_state;
|
||||
}
|
||||
|
||||
|
@ -224,12 +227,14 @@ THROW_DATA_CONSUMED_P(const struct vm_throw_data *obj)
|
|||
static inline void
|
||||
THROW_DATA_CATCH_FRAME_SET(struct vm_throw_data *obj, const rb_control_frame_t *cfp)
|
||||
{
|
||||
VM_ASSERT(THROW_DATA_P(obj));
|
||||
obj->catch_frame = cfp;
|
||||
}
|
||||
|
||||
static inline void
|
||||
THROW_DATA_STATE_SET(struct vm_throw_data *obj, int st)
|
||||
{
|
||||
VM_ASSERT(THROW_DATA_P(obj));
|
||||
obj->throw_state = (VALUE)st;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue