From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#64645: [PATCH] * src/lisp.h: Describe a simple mnemonics to understand XLI/XIL/XLP macros Date: Sat, 15 Jul 2023 09:49:41 +0000 Message-ID: <87zg3xqzbe.fsf@localhost> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16187"; mail-complaints-to="usenet@ciao.gmane.io" To: 64645@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 15 11:50:19 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qKbus-0003zz-Mf for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Jul 2023 11:50:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKbue-0000b1-RS; Sat, 15 Jul 2023 05:50:04 -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 1qKbuc-0000ao-WF for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 05:50:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qKbuc-00028s-O7 for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 05:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qKbuc-0004v9-K8 for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 05:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Jul 2023 09:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64645 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.168941458718882 (code B ref -1); Sat, 15 Jul 2023 09:50:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Jul 2023 09:49:47 +0000 Original-Received: from localhost ([127.0.0.1]:44196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKbuN-0004uU-5O for submit@debbugs.gnu.org; Sat, 15 Jul 2023 05:49:47 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:56452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKbuL-0004uD-4t for submit@debbugs.gnu.org; Sat, 15 Jul 2023 05:49:45 -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 1qKbuF-0000YW-Qg for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 05:49:39 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qKbuD-00025O-Dt for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 05:49:39 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 0494D24002A for ; Sat, 15 Jul 2023 11:49:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1689414575; bh=Gb7/h5V7zmjTRbIkbd4T5L2CXYCqQyT1V2aqq0mfrMc=; h=From:To:Subject:Date:Message-ID:MIME-Version:From; b=eT9DzU8vYCsw+LziF/ZHZEdRLT2Sqex17AAa87oTUTSmb7RTIVuvyYDibZq2Wwqp6 jZesqSYVEsoljz01C3zR1b+BvGk6JCl8EZHBnezDYN5V4pU429FsAw+m9wjxOdCvlh d1oPhpRCf7chgCwHwQ2hpsKQsQqg2X0f/L7q1yDdN0unNcJ8Rwf4XRDzLPXeikZk6M tbyjNA2MwZjh5PoTUyjgB4i4rEWcf2cNUk9wDOHkw1UKRXk/QOnnMh/4/dYE0jRHCd J8/wWite0mDyLGXYXlywkRXbpPVoJy+0GIgqeUep4d8Qd14HNZORrupGhw3pP62IX5 kXvm0ctsRIowA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4R33Tp1WCnz9rxL for ; Sat, 15 Jul 2023 11:49:33 +0200 (CEST) Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:265185 Archived-At: --=-=-= Content-Type: text/plain Tags: patch Hi, While reading the C sources, I kept stumbling upon the meaning of XLI/XIL/XLP macros. The attached patch adds a comment with simple mnemonics to remember what they mean. In GNU Emacs 30.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-07-13 built on localhost Repository revision: d97b77e6c66db46b198c696f83458aa141794727 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101008 System Description: Gentoo Linux Configured using: 'configure --with-native-compilation' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-src-lisp.h-Describe-a-simple-mnemonics-to-understand.patch >From f032a6a9c51cc0e9568c7cb36e30d365c14b5b8b Mon Sep 17 00:00:00 2001 Message-ID: From: Ihor Radchenko Date: Sat, 15 Jul 2023 12:46:43 +0300 Subject: [PATCH] * src/lisp.h: Describe a simple mnemonics to understand XLI/XIL/XLP macros These macro names may be confusing for untrained mind. Mnemonics described in the added comment helps to remember what is what for new readers. --- src/lisp.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lisp.h b/src/lisp.h index f10bce86b45..528db45dbcf 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -332,7 +332,11 @@ #define LISP_WORDS_ARE_POINTERS (EMACS_INT_MAX == INTPTR_MAX) see these functions for commentary. */ /* Convert among the various Lisp-related types: I for EMACS_INT, L - for Lisp_Object, P for void *. */ + for Lisp_Object, P for void *. + Useful mnemonics: + 1. XLI :: X is Lisp Integer + 2. XIL :: X Is Lisp + 3. XLP :: X is Lisp Pointer */ #if !CHECK_LISP_OBJECT_TYPE # if LISP_WORDS_ARE_POINTERS # define lisp_h_XLI(o) ((EMACS_INT) (o)) -- 2.41.0 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--