Re: [PATCH v3 3/3] qapi: Generate enum count as definition

2023-03-15 Thread Dr. David Alan Gilbert
* Philippe Mathieu-Daudé (phi...@linaro.org) 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

[PATCH v3 3/3] qapi: Generate enum count as definition

2023-03-15 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,