From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.devel Subject: Re: inlinable functions instead of macros Date: Mon, 20 Aug 2012 16:38:16 -0400 Organization: disorganization Message-ID: <87628ds3if.fsf@gnu.org> References: Reply-To: sds@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1345495117 28301 80.91.229.3 (20 Aug 2012 20:38:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Aug 2012 20:38:37 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 20 22:38:37 2012 Return-path: Envelope-to: ged-emacs-devel@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 1T3Yk9-0006yo-D7 for ged-emacs-devel@m.gmane.org; Mon, 20 Aug 2012 22:38:37 +0200 Original-Received: from localhost ([::1]:54120 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3Yk8-0007A5-0q for ged-emacs-devel@m.gmane.org; Mon, 20 Aug 2012 16:38:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3Yk2-0006vo-NC for emacs-devel@gnu.org; Mon, 20 Aug 2012 16:38:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T3Yk1-0005zw-AG for emacs-devel@gnu.org; Mon, 20 Aug 2012 16:38:30 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:47195) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3Yk1-0005zR-3l for emacs-devel@gnu.org; Mon, 20 Aug 2012 16:38:29 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T3Yjz-0006rN-DZ for emacs-devel@gnu.org; Mon, 20 Aug 2012 22:38:27 +0200 Original-Received: from cl-pat-tr.clearspring.com ([8.18.54.254]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 20 Aug 2012 22:38:27 +0200 Original-Received: from sds by cl-pat-tr.clearspring.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 20 Aug 2012 22:38:27 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 20 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: cl-pat-tr.clearspring.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. Cancel-Lock: sha1:gyo8aqjRqA2csWVn/ui/Yyk8FEU= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:152702 Archived-At: > * Stefan Monnier [2012-08-17 19:48:50 -0400]: > > While inlinable functions are much cleaner than macros, they have > a very serious downside: you just end up with > > lisp.h:2416: Emacs fatal error: assertion failed: found == !EQ (blv->defcell, blv->valcell) > > I.e. the file&line info is always the same rather than giving the > file&line where the inlinable function was called. a simple solution is this: inline void my_inlinable_function (....., char* file, int line) {....} #deinfe my_inlinable_function(.....) (my_inlinable_function)(.....,FILE,LINE) -- Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000 http://www.childpsy.net/ http://pmw.org.il http://www.PetitionOnline.com/tap12009/ http://dhimmi.com http://jihadwatch.org A man paints with his brains and not with his hands.