[SQUASH] rm symbol name
authorBT Templeton <bt@hcoop.net>
Sat, 17 Aug 2013 20:31:48 +0000 (16:31 -0400)
committerRobin Templeton <robin@terpri.org>
Sun, 19 Apr 2015 07:43:02 +0000 (03:43 -0400)
* src/alloc.c (set_symbol_name): Remove. All callers changed.
  (SYMBOL_NAME): Return Guile symbol name.

src/alloc.c
src/lisp.h

index 38a5482..65e063b 100644 (file)
@@ -1165,12 +1165,6 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INT
                           Symbol Allocation
  ***********************************************************************/
 
-static void
-set_symbol_name (Lisp_Object sym, Lisp_Object name)
-{
-  XSYMBOL (sym)->name = name;
-}
-
 void
 initialize_symbol (Lisp_Object val, Lisp_Object name)
 {
@@ -1179,7 +1173,6 @@ initialize_symbol (Lisp_Object val, Lisp_Object name)
   scm_module_define (symbol_module, val, scm_from_pointer (p, NULL));
   p = XSYMBOL (val);
   p->self = val;
-  set_symbol_name (val, name);
   scm_module_define (plist_module, val, Qnil);
   p->redirect = SYMBOL_PLAINVAL;
   SET_SYMBOL_VAL (p, Qunbound);
index ca44ab9..62e72ec 100644 (file)
@@ -1328,9 +1328,6 @@ struct Lisp_Symbol
   /* True if pointed to from purespace and hence can't be GC'd.  */
   bool_bf pinned : 1;
 
-  /* The symbol's name, as a Lisp string.  */
-  Lisp_Object name;
-
   /* Value of the symbol or Qunbound if unbound.  Which alternative of the
      union is used depends on the `redirect' field above.  */
   union {
@@ -1389,7 +1386,7 @@ SET_SYMBOL_FWD (struct Lisp_Symbol *sym, union Lisp_Fwd *v)
 INLINE Lisp_Object
 SYMBOL_NAME (Lisp_Object sym)
 {
-  return XSYMBOL (sym)->name;
+  return build_string (scm_to_locale_string (scm_symbol_to_string (sym)));
 }
 
 /* Value is true if SYM is an interned symbol.  */