aboutsummaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-07 05:22:09 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-07 05:22:09 +0000
commitbf938b5cf7d88cb8005696a81bde625566a09700 (patch)
treec48f45a0bb33edc2b5c507f2727b840c929f3280 /gc.c
parentc7bae7eafb1424f2b2c6b3c591168e0d9baa4cde (diff)
downloadruby-bf938b5cf7d88cb8005696a81bde625566a09700.tar.gz
* eval_intern.h: rename macros rb_thread_raised_* to
rb_ec_raised_*. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gc.c b/gc.c
index 49b5cbce5e..c1bcdd2c75 100644
--- a/gc.c
+++ b/gc.c
@@ -7697,27 +7697,27 @@ ruby_memerror(void)
void
rb_memerror(void)
{
- rb_thread_t *th = GET_THREAD();
- rb_objspace_t *objspace = rb_objspace_of(th->vm);
+ rb_execution_context_t *ec = GET_EC();
+ rb_objspace_t *objspace = rb_objspace_of(rb_ec_vm_ptr(ec));
VALUE exc;
if (during_gc) gc_exit(objspace, "rb_memerror");
exc = nomem_error;
if (!exc ||
- rb_thread_raised_p(th, RAISED_NOMEMORY)) {
+ rb_ec_raised_p(ec, RAISED_NOMEMORY)) {
fprintf(stderr, "[FATAL] failed to allocate memory\n");
exit(EXIT_FAILURE);
}
- if (rb_thread_raised_p(th, RAISED_NOMEMORY)) {
- rb_thread_raised_clear(th);
+ if (rb_ec_raised_p(ec, RAISED_NOMEMORY)) {
+ rb_ec_raised_clear(ec);
}
else {
- rb_thread_raised_set(th, RAISED_NOMEMORY);
+ rb_ec_raised_set(ec, RAISED_NOMEMORY);
exc = ruby_vm_special_exception_copy(exc);
}
- th->ec->errinfo = exc;
- EC_JUMP_TAG(th->ec, TAG_RAISE);
+ ec->errinfo = exc;
+ EC_JUMP_TAG(ec, TAG_RAISE);
}
static void *