all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 15880@debbugs.gnu.org
Subject: bug#15880: Compute C declarations for DEFSYMs automatically.
Date: Mon, 05 Jan 2015 14:20:01 -0800	[thread overview]
Message-ID: <54AB0E11.5050908@cs.ucla.edu> (raw)
In-Reply-To: <83egr980v9.fsf@gnu.org>

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

On 01/05/2015 11:48 AM, Eli Zaretskii wrote:
> I don't understand how this:
>
>    #define lisp_h_XSYMBOL(a) \
>       (eassert (SYMBOLP (a)), \
>        (struct Lisp_Symbol *) XUNTAGBASE (a, Lisp_Symbol, lispsym))
>    # define XSYMBOL(a) lisp_h_XSYMBOL (a)
>
> and this:
>
>    INLINE struct Lisp_Symbol *XSYMBOL (Lisp_Object);
>
> can live together.  Can you explain?

Ah, I see the problem now: I was compiling with optimization and you're 
not.  I installed the attached patch to fix that.  When optimizing, 
XSYMBOL is not defined as a macro.

[-- Attachment #2: 0001-lisp.h-XSYMBOL-Parenthesize-id-in-forward-decl.patch --]
[-- Type: text/x-patch, Size: 1518 bytes --]

From b8b71fa23d12cf5b0bd01f22be414a5067aadd47 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Mon, 5 Jan 2015 14:15:59 -0800
Subject: [PATCH] * lisp.h (XSYMBOL): Parenthesize id in forward decl.

Needed when neither optimizing nor inlining.
Also, sort decls alphabetically.
---
 src/ChangeLog | 6 ++++++
 src/lisp.h    | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index 8cc775b..69da1c3 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2015-01-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+	* lisp.h (XSYMBOL): Parenthesize id in forward decl.
+	Needed when neither optimizing nor inlining.
+	Also, sort decls alphabetically.
+
 2015-01-05  Eli Zaretskii  <eliz@gnu.org>
 
 	* w32proc.c, w32.h, w32fns.c, w32font.c, w32menu.c, w32notify.c:
diff --git a/src/lisp.h b/src/lisp.h
index fc04ab9..1f18b5e 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -609,10 +609,10 @@ INLINE bool SUB_CHAR_TABLE_P (Lisp_Object);
 INLINE bool SUBRP (Lisp_Object);
 INLINE bool (SYMBOLP) (Lisp_Object);
 INLINE bool (VECTORLIKEP) (Lisp_Object);
-INLINE struct Lisp_Symbol *XSYMBOL (Lisp_Object);
-INLINE void *(XUNTAGBASE) (Lisp_Object, int, void *);
 INLINE bool WINDOWP (Lisp_Object);
 INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object);
+INLINE struct Lisp_Symbol *(XSYMBOL) (Lisp_Object);
+INLINE void *(XUNTAGBASE) (Lisp_Object, int, void *);
 
 /* Defined in chartab.c.  */
 extern Lisp_Object char_table_ref (Lisp_Object, int);
-- 
2.1.0


  reply	other threads:[~2015-01-05 22:20 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13  0:33 bug#15880: Compute C declarations for DEFSYMs automatically Paul Eggert
2013-11-13  3:54 ` Eli Zaretskii
2013-11-13  5:00   ` Paul Eggert
2013-11-13  4:19 ` Stefan Monnier
2013-11-13  5:12   ` Paul Eggert
2013-11-13 13:36     ` Stefan Monnier
2013-11-13 16:25       ` Paul Eggert
2013-11-14  0:26         ` Stefan Monnier
2013-11-14  1:32           ` Paul Eggert
2013-11-14  2:29             ` Stefan Monnier
2013-11-14  4:13               ` Paul Eggert
2013-11-14  5:06                 ` Stefan Monnier
2013-11-14  5:26                   ` Paul Eggert
2013-11-14 16:28                 ` Eli Zaretskii
2013-11-14 20:25                   ` Paul Eggert
2013-11-15  7:59                     ` Eli Zaretskii
2013-11-15 13:58                       ` Stefan Monnier
2013-11-13 16:07   ` Eli Zaretskii
2013-11-13 22:00     ` Stefan Monnier
2013-11-14  3:47       ` Eli Zaretskii
2013-11-14  4:59         ` Stefan Monnier
2013-11-14 16:29           ` Eli Zaretskii
2014-12-20  1:55 ` Paul Eggert
2014-12-23 17:15   ` Stefan Monnier
2014-12-23 23:51     ` Paul Eggert
2015-01-05 16:51       ` Stefan Monnier
2015-01-05 17:25         ` Paul Eggert
2015-01-05 17:55           ` Stefan Monnier
2015-01-05 18:17             ` Paul Eggert
2015-01-05 18:56               ` Eli Zaretskii
2015-01-05 19:24                 ` Paul Eggert
2015-01-05 19:48                   ` Eli Zaretskii
2015-01-05 22:20                     ` Paul Eggert [this message]
2015-01-06  3:28                       ` Eli Zaretskii
2015-01-07 21:48                         ` Glenn Morris
2015-01-08  1:16                           ` Paul Eggert
2015-01-08 13:28                             ` Eli Zaretskii
2015-01-09 16:33                               ` Paul Eggert
2015-01-09 20:06                                 ` Eli Zaretskii
2015-01-09 20:08                                   ` Andreas Schwab
2015-01-09 20:50                                     ` Eli Zaretskii
2015-01-09 21:10                                       ` Andreas Schwab
2015-01-09 21:48                                       ` Stefan Monnier
2015-01-10 11:30                                         ` Eli Zaretskii
2015-01-05 19:27                 ` Eli Zaretskii

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=54AB0E11.5050908@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=15880@debbugs.gnu.org \
    --cc=eliz@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.