From 5a164c1891600cd20fadbda4f173b8a578f95126 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 21 Jun 2007 10:40:50 +0000 Subject: [PATCH] * yarvcore.c (rb_thread_mark): mark also thrown_errinfo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ yarvcore.c | 16 ++++++---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index dff11fab41..891e708a88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Jun 21 19:42:07 2007 Nobuyoshi Nakada + + * yarvcore.c (rb_thread_mark): mark also thrown_errinfo. + Thu Jun 21 17:13:44 2007 Nobuyoshi Nakada * parse.y (rb_intern2): name may not be NUL-terminated. diff --git a/yarvcore.c b/yarvcore.c index 9974b08580..0fe43a7743 100644 --- a/yarvcore.c +++ b/yarvcore.c @@ -259,8 +259,8 @@ thread_free(void *ptr) void yarv_machine_stack_mark(rb_thread_t *th); -static void -thread_mark(void *ptr) +void +rb_thread_mark(void *ptr) { rb_thread_t *th = NULL; MARK_REPORT_ENTER("thread"); @@ -289,6 +289,7 @@ thread_mark(void *ptr) MARK_UNLESS_NULL(th->thgroup); MARK_UNLESS_NULL(th->value); MARK_UNLESS_NULL(th->errinfo); + MARK_UNLESS_NULL(th->thrown_errinfo); MARK_UNLESS_NULL(th->local_svar); MARK_UNLESS_NULL(th->top_self); MARK_UNLESS_NULL(th->top_wrapper); @@ -311,19 +312,13 @@ thread_mark(void *ptr) MARK_REPORT_LEAVE("thread"); } -void -rb_thread_mark(void *ptr) -{ - thread_mark(ptr); -} - static VALUE thread_alloc(VALUE klass) { VALUE volatile obj; rb_thread_t *th; obj = Data_Make_Struct(klass, rb_thread_t, - thread_mark, thread_free, th); + rb_thread_mark, thread_free, th); return obj; } @@ -551,7 +546,8 @@ Init_VM(void) vm->self = Data_Wrap_Struct(rb_cVM, vm_mark, vm_free, vm); /* create main thread */ - th_self = th->self = Data_Wrap_Struct(rb_cThread, thread_mark, thread_free, th); + th_self = th->self = Data_Wrap_Struct(rb_cThread, rb_thread_mark, + thread_free, th); vm->main_thread = th; vm->running_thread = th;