From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sc3Ii-0000eF-7K for qemu-devel@nongnu.org; Tue, 05 Jun 2012 19:37:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sc3Hd-0006QY-Q6 for qemu-devel@nongnu.org; Tue, 05 Jun 2012 19:36:35 -0400 Received: from e6.ny.us.ibm.com ([32.97.182.146]:38164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sc3Hd-0006PX-Jl for qemu-devel@nongnu.org; Tue, 05 Jun 2012 19:35:29 -0400 Received: from /spool/local by e6.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 5 Jun 2012 19:35:25 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 27EDC6E804B for ; Tue, 5 Jun 2012 19:35:21 -0400 (EDT) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q55NZLrD161948 for ; Tue, 5 Jun 2012 19:35:21 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q55NZKnC027705 for ; Tue, 5 Jun 2012 20:35:20 -0300 Message-ID: <4FCE97B1.9090201@us.ibm.com> Date: Wed, 06 Jun 2012 07:35:13 +0800 From: Anthony Liguori MIME-Version: 1.0 References: <1338858018-17189-1-git-send-email-mdroth@linux.vnet.ibm.com> <1338858018-17189-3-git-send-email-mdroth@linux.vnet.ibm.com> <4FCE12F7.9010206@redhat.com> <20120605214403.GN2916@illuin> In-Reply-To: <20120605214403.GN2916@illuin> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 02/17] qidl: add qc definitions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth Cc: quintela@redhat.com, owasserm@redhat.com, qemu-devel@nongnu.org, yamahata@valinux.co.jp, Paolo Bonzini , akong@redhat.com, afaerber@suse.de On 06/06/2012 05:44 AM, Michael Roth wrote: > On Tue, Jun 05, 2012 at 04:08:55PM +0200, Paolo Bonzini wrote: >> Il 05/06/2012 03:00, Michael Roth ha scritto: >>> Signed-off-by: Michael Roth >>> --- >>> qapi/qc.h | 11 +++++++++++ >>> 1 files changed, 11 insertions(+), 0 deletions(-) >>> create mode 100644 qapi/qc.h >>> >>> diff --git a/qapi/qc.h b/qapi/qc.h >>> new file mode 100644 >>> index 0000000..3b3a8b9 >>> --- /dev/null >>> +++ b/qapi/qc.h >>> @@ -0,0 +1,11 @@ >>> +#ifndef QC_H >>> +#define QC_H >>> + >>> +#define qc_declaration >>> +#define _immutable >>> +#define _derived >>> +#define _broken >>> +#define _version(x) >>> +#define _size_is(x) >> >> Would it be feasible to make the declaration look like the GCC attribute >> extension, e.g. >> >> struct RTCState QIDL() { >> int foo QIDL(immutable); >> int bar QIDL(derived); >> }; >> >> so that you can just use "#define QIDL(...)"? This is how GCC >> developers did their introspection annotations. > > This does seem a lot cleaner to me, also simplifies the lexer and we get > namespacing for free. Makes sense to me. Regards, Anthony Liguori > >> >> Paolo >> > >