From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGtIE-0004a4-PE for qemu-devel@nongnu.org; Wed, 26 Sep 2012 11:13:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGtI8-0002Bm-RH for qemu-devel@nongnu.org; Wed, 26 Sep 2012 11:12:54 -0400 Received: from mail-oa0-f45.google.com ([209.85.219.45]:46994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGtI8-0002BW-ML for qemu-devel@nongnu.org; Wed, 26 Sep 2012 11:12:48 -0400 Received: by oagi18 with SMTP id i18so646289oag.4 for ; Wed, 26 Sep 2012 08:12:47 -0700 (PDT) Sender: fluxion Date: Wed, 26 Sep 2012 10:12:39 -0500 From: Michael Roth Message-ID: <20120926151239.GY16157@illuin> References: <1348236465-23124-1-git-send-email-mdroth@linux.vnet.ibm.com> <505C8E76.1030104@redhat.com> <20120921162428.GS16157@illuin> <20120924181442.GV16157@illuin> <5061511C.4040504@redhat.com> <20120925154502.GW16157@illuin> <87ehlpolhj.fsf@codemonkey.ws> <5062D6E1.2050207@redhat.com> <5062D9ED.4020606@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5062D9ED.4020606@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] Add infrastructure for QIDL-based device serialization List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , peter.maydell@linaro.org, Anthony Liguori , qemu-devel@nongnu.org, Blue Swirl , eblake@redhat.com On Wed, Sep 26, 2012 at 12:33:17PM +0200, Paolo Bonzini wrote: > Il 26/09/2012 12:20, Kevin Wolf ha scritto: > >>> >> QIDL_DECLARE(RTCState) { > >>> >> ISADevice dev qidl(immutable); > >>> >> MemoryRegion io qidl(immutable); > >> > > >> > Just like sparse is a "compiler", so is qidl. We are free to use the > >> > '_' + lowercase prefix. > >> > > >> > ISADevice _immutable dev; > >> > > >> > It's an established practice in wide-use. > > Not commenting on the underscore, but you did one thing that I want to > > support: Put the (q)_immutable in a place where it looks like a > > qualifier. Not so important for the qidl(...) syntax, but with the > > simplified forms I definitely like it better. > > > > I think I would even have made it '(q)_immutable ISADevice dev;', but > > having the field name last is what really matters for readability. > > Agreed. I don't want to be a nuisance, so: Michael, please pick one between Not a problem, the parser supports both before/after. I prefer before as well, except in the case of q_property("name", ) where we often need to put the variable name on a second line, but those aren't too common so let's just standardize on before for now since that'll benefit the common use case better. > > ISADevice QIDL(immutable) dev > ISADevice q_immutable dev > ISADevice qidl(immutable) dev > > and if you choose the second, let's make QIDL an implementation detail, > i.e. document that every new attribute we introduce should define a new > q_* macro. Ok, sounds like a plan. let's do q_*. > > Paolo >