all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Troy Hinckley <troyhinckley@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: question about Qnil representation
Date: Wed, 26 Oct 2022 10:04:47 -0600	[thread overview]
Message-ID: <5d85a71f-500e-43c7-a1fb-47ffe8518d94@Spark> (raw)
In-Reply-To: <8335bao9rs.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 882 bytes --]

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.
>

[-- Attachment #2: Type: text/html, Size: 1341 bytes --]

  reply	other threads:[~2022-10-26 16:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5a560265-fa81-42d2-945b-ab85d72df9e6@Spark>
2022-10-26 15:40 ` question about Qnil representation Troy Hinckley
2022-10-26 16:00   ` Eli Zaretskii
2022-10-26 16:04     ` Troy Hinckley [this message]
2022-10-26 16:09       ` Eli Zaretskii
2022-10-27  0:45       ` Po Lu
2022-10-26 16:16   ` Matt Armstrong
2022-10-26 16:22     ` Troy Hinckley
2022-10-26 16:45       ` Eli Zaretskii
2022-10-26 18:46         ` Troy Hinckley
2022-10-26 19:01           ` Stefan Monnier
2022-10-26 19:03           ` Eli Zaretskii
2022-10-27  0:47           ` Po Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5d85a71f-500e-43c7-a1fb-47ffe8518d94@Spark \
    --to=troyhinckley@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.