From 1a5f1a8c6966a973b26b85cb6e1e65ad0c5a5ed1 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 10 Jul 2008 03:10:00 +0000 Subject: * vm_core.h (rb_thread_t), vm.c (rb_thread_mark), process.c (rb_last_status_get, rb_last_status_set, rb_last_status_clear): moved last_status from rb_vm_t. [ruby-dev:35414] * vm.c (th_init2): initialize last_status with nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- process.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'process.c') diff --git a/process.c b/process.c index f75175defd..6e757338c1 100644 --- a/process.c +++ b/process.c @@ -218,23 +218,22 @@ static VALUE rb_cProcessStatus; VALUE rb_last_status_get(void) { - return GET_VM()->last_status; + return GET_THREAD()->last_status; } void rb_last_status_set(int status, rb_pid_t pid) { - rb_vm_t *vm = GET_VM(); - vm->last_status = rb_obj_alloc(rb_cProcessStatus); - rb_iv_set(vm->last_status, "status", INT2FIX(status)); - rb_iv_set(vm->last_status, "pid", PIDT2NUM(pid)); + rb_thread_t *th = GET_THREAD(); + th->last_status = rb_obj_alloc(rb_cProcessStatus); + rb_iv_set(th->last_status, "status", INT2FIX(status)); + rb_iv_set(th->last_status, "pid", PIDT2NUM(pid)); } static void rb_last_status_clear(void) { - rb_vm_t *vm = GET_VM(); - vm->last_status = Qnil; + GET_THREAD()->last_status = Qnil; } /* -- cgit v1.2.3