From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#15880: Compute C declarations for DEFSYMs automatically. Date: Mon, 05 Jan 2015 14:20:01 -0800 Organization: UCLA Computer Science Department Message-ID: <54AB0E11.5050908@cs.ucla.edu> References: <5282C8F4.5010806@cs.ucla.edu> <5494D719.4040507@cs.ucla.edu> <5499FFF1.9050106@cs.ucla.edu> <54AAC905.1020906@cs.ucla.edu> <54AAD51C.7020207@cs.ucla.edu> <83lhlh83a3.fsf@gnu.org> <54AAE504.5090701@cs.ucla.edu> <83egr980v9.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050306040300020001060207" X-Trace: ger.gmane.org 1420496578 26832 80.91.229.3 (5 Jan 2015 22:22:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Jan 2015 22:22:58 +0000 (UTC) Cc: 15880@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 05 23:22:51 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y8G1N-00084p-VZ for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Jan 2015 23:21:10 +0100 Original-Received: from localhost ([::1]:34183 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8G1N-0006ra-CI for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Jan 2015 17:21:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8G1J-0006qN-N5 for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2015 17:21:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8G1G-0004CD-BK for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2015 17:21:05 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8G1G-0004C9-8Q for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2015 17:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y8G1F-00030z-TN for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2015 17:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Jan 2015 22:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15880 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 15880-submit@debbugs.gnu.org id=B15880.142049641011518 (code B ref 15880); Mon, 05 Jan 2015 22:21:01 +0000 Original-Received: (at 15880) by debbugs.gnu.org; 5 Jan 2015 22:20:10 +0000 Original-Received: from localhost ([127.0.0.1]:37852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8G0P-0002zh-NA for submit@debbugs.gnu.org; Mon, 05 Jan 2015 17:20:10 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:36375) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8G0N-0002zY-Si for 15880@debbugs.gnu.org; Mon, 05 Jan 2015 17:20:08 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 46A89A60051; Mon, 5 Jan 2015 14:20:06 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eb8SWYpKfJNd; Mon, 5 Jan 2015 14:20:02 -0800 (PST) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 15353A60048; Mon, 5 Jan 2015 14:20:02 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 In-Reply-To: <83egr980v9.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:98057 Archived-At: This is a multi-part message in MIME format. --------------050306040300020001060207 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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. --------------050306040300020001060207 Content-Type: text/x-patch; name="0001-lisp.h-XSYMBOL-Parenthesize-id-in-forward-decl.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-lisp.h-XSYMBOL-Parenthesize-id-in-forward-decl.patch" >From b8b71fa23d12cf5b0bd01f22be414a5067aadd47 Mon Sep 17 00:00:00 2001 From: Paul Eggert 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 + + * lisp.h (XSYMBOL): Parenthesize id in forward decl. + Needed when neither optimizing nor inlining. + Also, sort decls alphabetically. + 2015-01-05 Eli Zaretskii * 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 --------------050306040300020001060207--