From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: Patch for fields of `struct buffer' Date: Fri, 28 Jan 2011 10:38:18 -0700 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1296236311 10411 80.91.229.12 (28 Jan 2011 17:38:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 28 Jan 2011 17:38:31 +0000 (UTC) Cc: Emacs discussions To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 28 18:38:27 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PisHC-0004Po-Gy for ged-emacs-devel@m.gmane.org; Fri, 28 Jan 2011 18:38:26 +0100 Original-Received: from localhost ([127.0.0.1]:46973 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PisHB-0007cb-W5 for ged-emacs-devel@m.gmane.org; Fri, 28 Jan 2011 12:38:26 -0500 Original-Received: from [140.186.70.92] (port=44091 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PisH7-0007cW-To for emacs-devel@gnu.org; Fri, 28 Jan 2011 12:38:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PisH6-00063P-PV for emacs-devel@gnu.org; Fri, 28 Jan 2011 12:38:21 -0500 Original-Received: from mx1.redhat.com ([209.132.183.28]:62465) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PisH6-00063H-Di for emacs-devel@gnu.org; Fri, 28 Jan 2011 12:38:20 -0500 Original-Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p0SHcJqu017004 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 28 Jan 2011 12:38:19 -0500 Original-Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p0SHcJEo026617; Fri, 28 Jan 2011 12:38:19 -0500 Original-Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p0SHcIRv029511; Fri, 28 Jan 2011 12:38:18 -0500 Original-Received: by opsy.redhat.com (Postfix, from userid 500) id 225E03784E2; Fri, 28 Jan 2011 10:38:18 -0700 (MST) X-Attribution: Tom In-Reply-To: (Stefan Monnier's message of "Fri, 28 Jan 2011 09:55:56 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:135167 Archived-At: Stefan> Please make the "#define BUF_FOO(BUF) ((BUF)->foo_)" to be Stefan> auto-generated (they could go into global.h). Ok, I will look at this. I think it will mean first making the current global.h be generated. At least, that will make it simpler. Stefan> Oh and the arg shojuld be `buf' rather than `BUF'. Stefan> I'd also be happier if the buffer.h code that defines the fields Stefan> used names without _ (so they'd have to be passed to a macro Stefan> that adds the _). Similarly the alloc.c code should ideally not Stefan> hard-code the "add an _" at every use but instead use some kind Stefan> of macro call like BUFFER_INTERNAL_FIELD(foo) that would return Stefan> "foo_". I implemented all these things. Tom