From 69029b90fea8a6b7e5607ead5e2184da30db9e76 Mon Sep 17 00:00:00 2001 From: ko1 Date: Mon, 15 Sep 2008 14:59:14 +0000 Subject: * gc.c, include/ruby/ruby.h: rename rb_register_mark_object() to rb_gc_register_mark_object(). * eval.c, vm.c: initialize vm->mark_object_ary at Init_top_self(). * bignum.c, complex.c, encoding.c, ext/win32ole/win32ole.c, io.c, load.c, marshal.c, rational.c, ruby.c, vm.c: use rb_gc_register_mark_object() instead of rb_global_variable() or rb_gc_register_address(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'vm.c') diff --git a/vm.c b/vm.c index 71658195b1..7841b43396 100644 --- a/vm.c +++ b/vm.c @@ -1820,7 +1820,7 @@ Init_VM(void) rb_define_method_id(klass, id_core_define_singleton_method, m_core_define_singleton_method, 3); rb_define_method_id(klass, id_core_set_postexe, m_core_set_postexe, 1); rb_obj_freeze(fcore); - rb_global_variable(&rb_mRubyVMFrozenCore); + rb_gc_register_mark_object(fcore); rb_mRubyVMFrozenCore = fcore; /* ::VM::Env */ @@ -1901,7 +1901,7 @@ Init_VM(void) vm->living_threads = st_init_numtable(); st_insert(vm->living_threads, th_self, (st_data_t) th->thread_id); - rb_register_mark_object(iseqval); + rb_gc_register_mark_object(iseqval); GetISeqPtr(iseqval, iseq); th->cfp->iseq = iseq; th->cfp->pc = iseq->iseq_encoded; @@ -1960,6 +1960,9 @@ Init_top_self(void) vm->top_self = rb_obj_alloc(rb_cObject); rb_define_singleton_method(rb_vm_top_self(), "to_s", main_to_s, 0); + + /* initialize mark object array */ + vm->mark_object_ary = rb_ary_new(); } VALUE * -- cgit v1.2.3