[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/17] qidl: add qc definitions
From: |
Michael Roth |
Subject: |
Re: [Qemu-devel] [PATCH 02/17] qidl: add qc definitions |
Date: |
Tue, 5 Jun 2012 16:44:03 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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 <address@hidden>
> > ---
> > 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.
>
> Paolo
>
[Qemu-devel] [PATCH 04/17] qapi: QmpOutputVisitor, implement array handling, Michael Roth, 2012/06/04
[Qemu-devel] [PATCH 03/17] qapi: add visitor interfaces for arrays, Michael Roth, 2012/06/04
[Qemu-devel] [PATCH 01/17] qidl: add QEMU IDL processor, Michael Roth, 2012/06/04