From 2f0faf671dcf8eadebdd0e35a567ddb8bd95bcaa Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 29 Jan 2001 05:10:42 +0000 Subject: * string.c (str_independent): should not clear str->orig here. it's too early. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- gc.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'gc.c') diff --git a/gc.c b/gc.c index abc8e69919..c40d36aed6 100644 --- a/gc.c +++ b/gc.c @@ -6,7 +6,7 @@ $Date$ created at: Tue Oct 5 09:44:46 JST 1993 - Copyright (C) 1993-2000 Yukihiro Matsumoto + Copyright (C) 1993-2001 Yukihiro Matsumoto Copyright (C) 2000 Network Applied Communication Laboratory, Inc. Copyright (C) 2000 Information-technology Promotion Agency, Japan @@ -149,8 +149,8 @@ static int during_gc; static int need_call_final = 0; static st_table *finalizer_table = 0; -static VALUE -gc_enable() +VALUE +rb_gc_enable() { int old = dont_gc; @@ -158,8 +158,8 @@ gc_enable() return old; } -static VALUE -gc_disable() +VALUE +rb_gc_disable() { int old = dont_gc; @@ -996,8 +996,8 @@ rb_gc() gc_sweep(); } -static VALUE -gc_start() +VALUE +rb_gc_start() { rb_gc(); return Qnil; @@ -1299,14 +1299,14 @@ Init_GC() VALUE rb_mObSpace; rb_mGC = rb_define_module("GC"); - rb_define_singleton_method(rb_mGC, "start", gc_start, 0); - rb_define_singleton_method(rb_mGC, "enable", gc_enable, 0); - rb_define_singleton_method(rb_mGC, "disable", gc_disable, 0); - rb_define_method(rb_mGC, "garbage_collect", gc_start, 0); + rb_define_singleton_method(rb_mGC, "start", rb_gc_start, 0); + rb_define_singleton_method(rb_mGC, "enable", rb_gc_enable, 0); + rb_define_singleton_method(rb_mGC, "disable", rb_gc_disable, 0); + rb_define_method(rb_mGC, "garbage_collect", rb_gc_start, 0); rb_mObSpace = rb_define_module("ObjectSpace"); rb_define_module_function(rb_mObSpace, "each_object", os_each_obj, -1); - rb_define_module_function(rb_mObSpace, "garbage_collect", gc_start, 0); + rb_define_module_function(rb_mObSpace, "garbage_collect", rb_gc_start, 0); rb_define_module_function(rb_mObSpace, "add_finalizer", add_final, 1); rb_define_module_function(rb_mObSpace, "remove_finalizer", rm_final, 1); rb_define_module_function(rb_mObSpace, "finalizers", finals, 0); -- cgit v1.2.3