diff src/symbols.c @ 245:51092a27c943 r20-5b21

Import from CVS: tag r20-5b21
author cvs
date Mon, 13 Aug 2007 10:17:54 +0200
parents f955c73f5258
children e70b3a057e12
line wrap: on
line diff
--- a/src/symbols.c	Mon Aug 13 10:17:09 2007 +0200
+++ b/src/symbols.c	Mon Aug 13 10:17:54 2007 +0200
@@ -102,6 +102,14 @@
 
   ((markobj) (sym->value));
   ((markobj) (sym->function));
+  /* DON'T mark through ->obarray slot.  Since the slot is not visible
+     from Lisp, it would be wrong not to gc an obarray vector only
+     because there are symbols pointing to it.  This is safe, because
+     we only check the nil-ness of the object.  An implication of this
+     is that, when the obarray vector is gc-ed, its symbols are still
+     considered "interned" for printing purposes -- but it's probably
+     no big deal.  */
+  /*((markobj) (sym->obarray));*/
   XSETSTRING (pname, sym->name);
   ((markobj) (pname));
   if (!symbol_next (sym))
@@ -191,6 +199,7 @@
   if (purify_flag && ! purified (str))
     str = make_pure_pname (XSTRING_DATA (str), len, 0);
   sym = Fmake_symbol (str);
+  XSYMBOL (sym)->obarray = obarray;
 
   if (SYMBOLP (*ptr))
     symbol_next (XSYMBOL (sym)) = XSYMBOL (*ptr);
@@ -275,7 +284,7 @@
 	    }
 	}
     }
-
+  XSYMBOL (tem)->obarray = Qnil;
   return Qt;
 }
 
@@ -3156,6 +3165,7 @@
     hash %= OBARRAY_SIZE;
     tem = &XVECTOR_DATA (Vobarray)[hash];
     *tem = Qnil;
+    XSYMBOL (Qnil)->obarray = Vobarray;
   }
 
   {