Re: [Qemu-devel] [PATCH 1/9] qapi: allow sharing enum implementation across visitors

2012-02-21 Thread Paolo Bonzini
On 02/21/2012 09:31 PM, Andreas Färber wrote: >> > +void output_type_enum(Visitor *v, int *obj, const char *strings[], >> > + const char *kind, const char *name, >> > + Error **errp) >> > +{ >> > +int i = 0; >> > +int value = *obj; >> > +char *e

Re: [Qemu-devel] [PATCH 1/9] qapi: allow sharing enum implementation across visitors

2012-02-21 Thread Andreas Färber
Am 09.02.2012 15:31, schrieb Paolo Bonzini: > Most visitors will use the same code for enum parsing. Move it to > the core. > > Signed-off-by: Paolo Bonzini Reviewed-by: Andreas Färber However... > diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c > index ddef3ed..a4e088c 100644 >

[Qemu-devel] [PATCH 1/9] qapi: allow sharing enum implementation across visitors

2012-02-09 Thread Paolo Bonzini
Most visitors will use the same code for enum parsing. Move it to the core. Signed-off-by: Paolo Bonzini --- qapi/qapi-visit-core.c| 51 + qapi/qapi-visit-impl.h| 23 qapi/qmp-input-visitor.c | 34 +-