emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question about Qnil representation


From: Troy Hinckley
Subject: Re: question about Qnil representation
Date: Wed, 26 Oct 2022 10:04:47 -0600

Sure, but it reinterprets the integer as a *Lisp_Symbol to get at the actual struct correct? Or am I misunderstanding how this works?
On Oct 26, 2022, 10:00 AM -0600, Eli Zaretskii <eliz@gnu.org>, wrote:
Date: Wed, 26 Oct 2022 09:40:30 -0600
From: Troy Hinckley <troyhinckley@gmail.com>

I have been reading through the C source to try and learn it and understand it better. I saw in Changeling.13 an
entry From Paul Eggert on 2015-01-05 with “Use 0 for Qnil” As a fix for Bug#15880. How does this work in
practice? It looks like symbols are just pointers, but 0 would not be a valid pointer. I don’t see any special code
for handling the null case.

Symbols are not pointers, they have the same C type as any other
Lisp_Object. If Lisp_Object is represented by an integer number, then
zero is a valid integer number as well.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]