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:45:10 +0300 Message-ID: <83wn8mmt49.fsf@gnu.org> References: <5a560265-fa81-42d2-945b-ab85d72df9e6@Spark> <5a00e93e-5f44-4865-aeeb-51f0aced9996@Spark> <87ilk6a7be.fsf@rfc20.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27990"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, matt@rfc20.org To: Troy Hinckley Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 26 18:47:05 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 1onjYW-00078m-H5 for ged-emacs-devel@m.gmane-mx.org; Wed, 26 Oct 2022 18:47:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onjWu-0000dy-Bi; Wed, 26 Oct 2022 12:45:24 -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 1onjWs-0000UV-Fp for emacs-devel@gnu.org; Wed, 26 Oct 2022 12:45: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 1onjWr-0002u6-Rp; Wed, 26 Oct 2022 12:45:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=F8VI34a3InCHwN5GwtCAxU/cOpurj5udJ8iZcLLhH+U=; b=f9+h+l50zsI8 667A+/040AAeftbid/se52bejynOFmObWYacxqpKIflGSQ2MHU5G5PWzmuubeDX2TLA258wApuzfs RMtEnCDzeEZcyrpL5alTWFNUCLCKQmt8vDlJNMq/xfkGKWR0t6X2CvZiunniS2ZO1oFob98A44khh sQiRUVQ6OyOn1stP7ZI83SjVy6djUMpHKGj4wXiPT4OTNmYADVLWRUUPqCSU2XmPawGsE4z6l4FaY J5WqzUsM71uaEuzOSsDHAClmPEbScVod0g4Mr+EHtZ/dh1jrGHaQ0Ocs05mfj7RHTS57ozr0YHYsE e7IkFMZN8rT8Y3r0NbaCXw==; 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 1onjWr-0004XW-AA; Wed, 26 Oct 2022 12:45:21 -0400 In-Reply-To: (message from Troy Hinckley on Wed, 26 Oct 2022 10:22:54 -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:298561 Archived-At: > Date: Wed, 26 Oct 2022 10:22:54 -0600 > From: Troy Hinckley > > 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? See make_lisp_symbol and builtin_lisp_symbol, and I think you will understand what's going on here. Also see the value stored in lispsym[0].