unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Question regarding Lisp_Object representation of symbols
@ 2024-03-06  6:48 Gerd Möllmann
  2024-03-06  8:41 ` Po Lu
  2024-03-06 12:14 ` Eli Zaretskii
  0 siblings, 2 replies; 6+ messages in thread
From: Gerd Möllmann @ 2024-03-06  6:48 UTC (permalink / raw)
  To: emacs-devel

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?

Thanks!



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-03-07  4:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-06  6:48 Question regarding Lisp_Object representation of symbols Gerd Möllmann
2024-03-06  8:41 ` Po Lu
2024-03-06  8:56   ` Gerd Möllmann
2024-03-06 12:14 ` Eli Zaretskii
2024-03-06 20:32   ` Paul Eggert
2024-03-07  4:28     ` Gerd Möllmann

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).