[前][次][番号順一覧][スレッド一覧]

ruby-changes:8182

From: nobu <ko1@a...>
Date: Wed, 8 Oct 2008 11:18:35 +0900 (JST)
Subject: [ruby-changes:8182] Ruby:r19710 (trunk, ruby_1_8): * variable.c (autoload_delete, autoload_file): should not delete

nobu	2008-10-08 11:18:15 +0900 (Wed, 08 Oct 2008)

  New Revision: 19710

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19710

  Log:
    * variable.c (autoload_delete, autoload_file): should not delete
      autoload table, since it may be shared with duplicated modules.
      [ruby-core:19181]

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/variable.c
    trunk/ChangeLog
    trunk/variable.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 19709)
+++ ChangeLog	(revision 19710)
@@ -1,3 +1,9 @@
+Wed Oct  8 11:18:12 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* variable.c (autoload_delete, autoload_file): should not delete
+	  autoload table, since it may be shared with duplicated modules.
+	  [ruby-core:19181]
+
 Wed Oct  8 02:38:28 2008  Yukihiro Matsumoto  <matz@r...>
 
 	* encoding.c (rb_default_internal_encoding): merged a patch from
Index: variable.c
===================================================================
--- variable.c	(revision 19709)
+++ variable.c	(revision 19710)
@@ -1374,12 +1374,8 @@
 	st_delete(tbl, (st_data_t*)&id, &load);
 
 	if (tbl->num_entries == 0) {
-	    DATA_PTR(val) = 0;
-	    st_free_table(tbl);
 	    id = autoload;
-	    if (st_delete(RCLASS_IV_TBL(mod), (st_data_t*)&id, &val)) {
-		rb_gc_force_recycle(val);
-	    }
+	    st_delete(RCLASS_IV_TBL(mod), (st_data_t*)&id, &val);
 	}
     }
 
@@ -1421,12 +1417,8 @@
     /* already loaded but not defined */
     st_delete(tbl, (st_data_t*)&id, 0);
     if (!tbl->num_entries) {
-	DATA_PTR(val) = 0;
-	st_free_table(tbl);
 	id = autoload;
-	if (st_delete(RCLASS_IV_TBL(mod), (st_data_t*)&id, &val)) {
-	    rb_gc_force_recycle(val);
-	}
+	st_delete(RCLASS_IV_TBL(mod), (st_data_t*)&id, &val);
     }
     return Qnil;
 }
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 19709)
+++ ruby_1_8/ChangeLog	(revision 19710)
@@ -1,3 +1,9 @@
+Wed Oct  8 11:18:12 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* variable.c (autoload_delete, autoload_file): should not delete
+	  autoload table, since it may be shared with duplicated modules.
+	  [ruby-core:19181]
+
 Wed Oct  8 00:09:13 2008  Tadayoshi Funaba  <tadf@d...>
 
 	* lib/date.rb (today,now): should produce own instances.
Index: ruby_1_8/variable.c
===================================================================
--- ruby_1_8/variable.c	(revision 19709)
+++ ruby_1_8/variable.c	(revision 19710)
@@ -1338,12 +1338,8 @@
 	st_delete(tbl, (st_data_t*)&id, &load);
 
 	if (tbl->num_entries == 0) {
-	    DATA_PTR(val) = 0;
-	    st_free_table(tbl);
 	    id = autoload;
-	    if (st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val)) {
-		rb_gc_force_recycle(val);
-	    }
+	    st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val);
 	}
     }
 
@@ -1389,12 +1385,8 @@
     /* already loaded but not defined */
     st_delete(tbl, (st_data_t*)&id, 0);
     if (!tbl->num_entries) {
-	DATA_PTR(val) = 0;
-	st_free_table(tbl);
 	id = autoload;
-	if (st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val)) {
-	    rb_gc_force_recycle(val);
-	}
+	st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val);
     }
     return Qnil;
 }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]