diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-07 05:22:09 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-07 05:22:09 +0000 |
commit | 48ce4cb414be48be1a73d2530203469b3b98281c (patch) | |
tree | c48f45a0bb33edc2b5c507f2727b840c929f3280 /gc.c | |
parent | ee189904f0e3e0263adcbcc844947f6ccddfb7ad (diff) | |
download | ruby-48ce4cb414be48be1a73d2530203469b3b98281c.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.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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 * |