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:22:54 -0600

Clearly I am doing a poor job explaining my question. 

Let me try again. As I understand it, every Symbol is an instance if Lisp_Symbol. The Lisp_Object is an integer that can represent multiple types with tags defined by Lisp_Type. If the tag is 0, then the type is a symbol. In that case you would treat the rest of the bytes in the Lisp_Object as pointer to a Lisp_Symbol instance. However if the symbol nil is defined as 0, then it is not a pointer to anything. How then do you access that symbol? Is there special case code to handle the null pointer?

I hope that question makes more sense. Let me know where my understanding is wrong.
On Oct 26, 2022, 10:16 AM -0600, Matt Armstrong <matt@rfc20.org>, wrote:
Troy Hinckley <troyhinckley@gmail.com> writes:

but 0 would not be a valid pointer.

I am a confused by this. 0 is a valid value for a C pointer. This is
what NULL is, etc. You must not dereference it, but it is a valid
value.

reply via email to

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