diff src/lisp.h @ 343:8bec6624d99b r21-1-1

Import from CVS: tag r21-1-1
author cvs
date Mon, 13 Aug 2007 10:52:53 +0200
parents 19dcec799385
children 7c94d56991e1
line wrap: on
line diff
--- a/src/lisp.h	Mon Aug 13 10:52:06 2007 +0200
+++ b/src/lisp.h	Mon Aug 13 10:52:53 2007 +0200
@@ -1027,9 +1027,25 @@
   struct Lisp_String *name;
   Lisp_Object value;
   Lisp_Object function;
-  /* non-nil if the symbol is interned in Vobarray */
-  Lisp_Object obarray;
   Lisp_Object plist;
+ /* Information on obarray status of the symbol.  Each symbol can be
+    interned into one and only one obarray during its life-time.  An
+    interned symbol can be uninterned, but the reverse does not hold
+    true.  We need to know whether the symbol is interned to Vobarray
+    (for the purposes of printing), and whether the symbol is
+    interned anywhere at all.  We also need to know whether the
+    symbol is being referenced through a pure structure.
+
+    The .obarray_flags field is an integer mask with the following
+    meanings for bits:
+
+    * 1 - symbol is interned somewhere;
+    * 2 - symbol is interned to Vobarray;
+    * 4 - symbol is referenced by a pure structure.
+
+    All of this is unneeded in 21.2, which does not have pure space in
+    our sense of the word, thanks to Olivier.  */
+ int obarray_flags;
 };
 
 #define SYMBOL_IS_KEYWORD(sym) (string_byte (XSYMBOL(sym)->name, 0) == ':')
@@ -1063,6 +1079,9 @@
 #define symbol_function(s) ((s)->function)
 #define symbol_plist(s) ((s)->plist)
 
+#define symbol_obarray_flags(s) ((s)->obarray_flags)
+#define XSYMBOL_OBARRAY_FLAGS(x) (XSYMBOL (x)->obarray_flags)
+
 /*********** subr ***********/
 
 typedef Lisp_Object (*lisp_fn_t) (void);
@@ -1703,7 +1722,7 @@
 #define NNGCPRO5(v1,v2,v3,v4,v5) \
  debug_gcpro5 (__FILE__, __LINE__,&nngcpro1,&nngcpro2,&nngcpro3,&nngcpro4,\
 	       &nngcpro5,&v1,&v2,&v3,&v4,&v5)
-#define NUNNGCPRO \
+#define NNUNGCPRO \
  debug_ungcpro(__FILE__, __LINE__,&nngcpro1)
 
 #else /* ! DEBUG_GCPRO */