INLINE Lisp_Object build_string (const char *);
extern Lisp_Object symbol_module;
extern Lisp_Object function_module;
+extern Lisp_Object plist_module;
INLINE struct Lisp_Symbol *
XSYMBOL (Lisp_Object a)
Symbols
***********************************************************************/
-/* Interned state of a symbol. */
-
-enum symbol_interned
-{
- SYMBOL_UNINTERNED = 0,
- SYMBOL_INTERNED = 1,
- SYMBOL_INTERNED_IN_INITIAL_OBARRAY = 2
-};
-
enum symbol_redirect
{
SYMBOL_PLAINVAL = 4,
can be changed, but only by `defconst'. */
unsigned constant : 2;
- /* Interned state of the symbol. This is an enumerator from
- enum symbol_interned. */
- unsigned interned : 2;
-
/* True means that this variable has been explicitly declared
special (with `defvar' etc), and shouldn't be lexically bound. */
bool_bf declared_special : 1;
/* 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 {
struct Lisp_Buffer_Local_Value *blv;
union Lisp_Fwd *fwd;
} val;
-
- /* The symbol's property list. */
- Lisp_Object plist;
};
/* Value is name of symbol. */
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. */
INLINE bool
SYMBOL_INTERNED_P (Lisp_Object sym)
{
- return XSYMBOL (sym)->interned != SYMBOL_UNINTERNED;
-}
-
-/* Value is true if SYM is interned in initial_obarray. */
-
-INLINE bool
-SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P (Lisp_Object sym)
-{
- return XSYMBOL (sym)->interned == SYMBOL_INTERNED_IN_INITIAL_OBARRAY;
+ return scm_is_true (scm_symbol_interned_p (sym));
}
INLINE Lisp_Object
INLINE Lisp_Object
symbol_plist (Lisp_Object sym)
{
- return XSYMBOL (sym)->plist;
+ return scm_variable_ref (scm_module_lookup (plist_module, sym));
}
INLINE void
set_symbol_plist (Lisp_Object sym, Lisp_Object plist)
{
- XSYMBOL (sym)->plist = plist;
+ scm_variable_set_x (scm_module_lookup (plist_module, sym), plist);
}
/* Buffer-local (also frame-local) variable access functions. */