[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question regarding Lisp_Object representation of symbols
From: |
Eli Zaretskii |
Subject: |
Re: Question regarding Lisp_Object representation of symbols |
Date: |
Wed, 06 Mar 2024 14:14:24 +0200 |
> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Date: Wed, 06 Mar 2024 07:48:31 +0100
>
> Symbols are currently encoded as words with tag = 0 (= Lisp_Symbol
> enumerator), that when untagged are an offset from lispsym (the array of
> built-in symbols), not a pointer to some structure like it is done for
> other Lisp types. That makes the word 0x0 = Qnil, 0x1 = Qt, and so on.
>
> My question comes from playing with another GC library, where this
> unique encoding is, well, quite inconvenient. So, I'd like to ask two
> questions:
>
> - Does someone remember the reasons why this has been done?
>
> - Is there something that relies on this? Maybe something that
> relies on 0x0 being a valid Lisp_Object?
Paul, can you help us answer these questions?