Re: [PATCH 2/2] qapi: Generate enum count as definition in gen_enum_lookup()

2023-03-15 Thread Philippe Mathieu-Daudé
On 27/2/23 14:10, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: QAPI's gen_enum() generates QAPI enum values and the number of this values (as foo__MAX). The number of entries in an enum type is not part of the enumerated values, but we generate it as such. See for example: typed

Re: [PATCH 2/2] qapi: Generate enum count as definition in gen_enum_lookup()

2023-02-27 Thread Juan Quintela
Philippe Mathieu-Daudé wrote: > QAPI's gen_enum() generates QAPI enum values and the number > of this values (as foo__MAX). > The number of entries in an enum type is not part of the > enumerated values, but we generate it as such. See for > example: > > typedef enum OnOffAuto { > ON_OFF_A

Re: [PATCH 2/2] qapi: Generate enum count as definition in gen_enum_lookup()

2023-02-27 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > QAPI's gen_enum() generates QAPI enum values and the number > of this values (as foo__MAX). > The number of entries in an enum type is not part of the > enumerated values, but we generate it as such. See for > example: > > typedef enum OnOffAuto { > ON_OFF

Re: [PATCH 2/2] qapi: Generate enum count as definition in gen_enum_lookup()

2023-02-24 Thread Richard Henderson
On 2/24/23 05:54, Philippe Mathieu-Daudé wrote: QAPI's gen_enum() generates QAPI enum values and the number of this values (as foo__MAX). The number of entries in an enum type is not part of the enumerated values, but we generate it as such. See for example: typedef enum OnOffAuto { ON

[PATCH 2/2] qapi: Generate enum count as definition in gen_enum_lookup()

2023-02-24 Thread Philippe Mathieu-Daudé
QAPI's gen_enum() generates QAPI enum values and the number of this values (as foo__MAX). The number of entries in an enum type is not part of the enumerated values, but we generate it as such. See for example: typedef enum OnOffAuto { ON_OFF_AUTO_AUTO, ON_OFF_AUTO_ON, ON_OFF_A