From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: question about Qnil representation Date: Wed, 26 Oct 2022 19:00:07 +0300 Message-ID: <8335bao9rs.fsf@gnu.org> References: <5a560265-fa81-42d2-945b-ab85d72df9e6@Spark> <5a00e93e-5f44-4865-aeeb-51f0aced9996@Spark> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18279"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Troy Hinckley Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 26 18:08:48 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1onixS-0004cR-6z for ged-emacs-devel@m.gmane-mx.org; Wed, 26 Oct 2022 18:08:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oniqP-0008CF-9r; Wed, 26 Oct 2022 12:01:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onipH-0006RY-5V for emacs-devel@gnu.org; Wed, 26 Oct 2022 12:00:22 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onipF-0002Oc-RQ; Wed, 26 Oct 2022 12:00:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=eZ8DQBv2hi7cUEqV9W386ljsFdiRCHwpaXftOmxGRJs=; b=K/AXxWte9FaNocD0WtFT mBkpuo3ifReRtZdQYYxaJvjGmR54StZ+JoSpMtqvsLa8NmyOgtryUXzBuwxvJVq3xpcpjp5eemAFj Xa9nohZdRYuL5xpwOt1uK2iXAS9q3QjViL5w4t89GbAeQF91pZZzJ0T7caGN9lDg8Z8am+QVAKp5b 5iKNRw93U6em9npXSkyB2NebKJJtsTFSv170kazArZ4Ni7IqHFSBwbhA3bVBRhx8QLHlYHY3ye/6R dHNhSrZfMOzD34V1gzmFx3XlCBGoTWl37ZU9dSy9t4w7jW5MSQq90Ukx2jp0zR9bk9TrMRlfiJRIv wHhHbNbMcnkrvw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onipE-0003dF-9z; Wed, 26 Oct 2022 12:00:16 -0400 In-Reply-To: <5a00e93e-5f44-4865-aeeb-51f0aced9996@Spark> (message from Troy Hinckley on Wed, 26 Oct 2022 09:40:30 -0600) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "Emacs-devel" Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:298556 Archived-At: > Date: Wed, 26 Oct 2022 09:40:30 -0600 > From: Troy Hinckley > > 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.