aboutsummaryrefslogtreecommitdiffstats
path: root/yarvcore.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-21 10:40:50 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-21 10:40:50 +0000
commit5a164c1891600cd20fadbda4f173b8a578f95126 (patch)
treee2327574297f879ab45d4b0ef901084fcd516a99 /yarvcore.c
parent3fc180ebeb7db9d2b0193c846b780bc1967026f3 (diff)
downloadruby-5a164c1891600cd20fadbda4f173b8a578f95126.tar.gz
* 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
Diffstat (limited to 'yarvcore.c')
-rw-r--r--yarvcore.c16
1 files changed, 6 insertions, 10 deletions
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;