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
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
>
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 +-