qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] qapi: Simplify enum generation
@ 2023-03-15 11:13 Philippe Mathieu-Daudé
  2023-03-15 11:13 ` [PATCH v2 1/3] scripts/git.orderfile: Display QAPI script changes before schema ones Philippe Mathieu-Daudé
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-03-15 11:13 UTC (permalink / raw)
  To: qemu-devel
  Cc: Pavel Dovgalyuk, Dr. David Alan Gilbert, Juan Quintela,
	Gerd Hoffmann, Marc-André Lureau, Michael Roth,
	Markus Armbruster, Stefan Berger, Paolo Bonzini,
	Philippe Mathieu-Daudé

QAPI generating enum count as part of the enum forces handling
impossible switch cases. Modify qapi/types.py to generate the
enum count as a definition.
Do not try to cover the unreachable 'default' case.
Clean files covering unreachable foo__MAX case.

Since v1:
- Update documentation (Markus)
- Do not generate empty enums (Markus)
- Collect R-b tags

Philippe Mathieu-Daudé (3):
  scripts/git.orderfile: Display QAPI script changes before schema ones
  qapi: Do not generate empty enum
  qapi: Generate enum count as definition

 docs/devel/qapi-code-gen.rst | 10 +++++-----
 scripts/qapi/schema.py       |  5 ++++-
 scripts/qapi/types.py        | 11 +++++++----
 scripts/qapi/visit.py        |  2 --
 audio/audio_template.h       |  3 ---
 audio/audio.c                |  6 ------
 migration/migration.c        |  2 --
 replay/replay-input.c        | 12 ------------
 softmmu/tpm-hmp-cmds.c       |  2 --
 ui/input-linux.c             |  4 ----
 ui/input.c                   |  6 ------
 scripts/git.orderfile        |  2 ++
 12 files changed, 18 insertions(+), 47 deletions(-)

-- 
2.38.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-03-15 15:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-15 11:13 [PATCH v2 0/3] qapi: Simplify enum generation Philippe Mathieu-Daudé
2023-03-15 11:13 ` [PATCH v2 1/3] scripts/git.orderfile: Display QAPI script changes before schema ones Philippe Mathieu-Daudé
2023-03-15 11:13 ` [PATCH v2 2/3] qapi: Do not generate empty enum Philippe Mathieu-Daudé
2023-03-15 15:19   ` Stefan Berger
2023-03-15 15:25     ` Philippe Mathieu-Daudé
2023-03-15 11:13 ` [PATCH v2 3/3] qapi: Generate enum count as definition Philippe Mathieu-Daudé
2023-03-15 11:22 ` [PATCH v2 0/3] qapi: Simplify enum generation Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).