qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] qapi: Refactor QAPISchemaVariants
@ 2024-03-20  7:43 Markus Armbruster
  2024-03-20  7:43 ` [PATCH 1/7] qapi: New QAPISchemaBranches, QAPISchemaAlternatives Markus Armbruster
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Markus Armbruster @ 2024-03-20  7:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: jsnow, peter.maydell, michael.roth

QAPISchemaVariants represents either a union type's branches, or an
alternate type's alternatives.  Much of its code is conditional on
which one it actually is.

This series moves the conditional code to new subtypes
QAPISchemaBranches and QAPISchemaAlternatives.

This also lets us treat QAPISchemaVariants.tag_member like the other
attribute that become known only in .check().

Markus Armbruster (7):
  qapi: New QAPISchemaBranches, QAPISchemaAlternatives
  qapi: Rename visitor parameter @variants to @branches
  qapi: Rename visitor parameter @variants to @alternatives
  qapi: Rename QAPISchemaObjectType.variants to .branches
  qapi: Rename QAPISchemaAlternateType.variants to .alternatives
  qapi: Move conditional code from QAPISchemaVariants to its subtypes
  qapi: Simplify QAPISchemaVariants @tag_member

 docs/sphinx/qapidoc.py         |  21 ++--
 scripts/qapi/commands.py       |   2 +-
 scripts/qapi/events.py         |   2 +-
 scripts/qapi/gen.py            |   2 +-
 scripts/qapi/introspect.py     |  15 +--
 scripts/qapi/schema.py         | 223 +++++++++++++++++----------------
 scripts/qapi/types.py          |  12 +-
 scripts/qapi/visit.py          |  24 ++--
 tests/qapi-schema/test-qapi.py |   9 +-
 9 files changed, 163 insertions(+), 147 deletions(-)

-- 
2.44.0



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

end of thread, other threads:[~2024-03-20  7:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-20  7:43 [PATCH 0/7] qapi: Refactor QAPISchemaVariants Markus Armbruster
2024-03-20  7:43 ` [PATCH 1/7] qapi: New QAPISchemaBranches, QAPISchemaAlternatives Markus Armbruster
2024-03-20  7:43 ` [PATCH 2/7] qapi: Rename visitor parameter @variants to @branches Markus Armbruster
2024-03-20  7:43 ` [PATCH 3/7] qapi: Rename visitor parameter @variants to @alternatives Markus Armbruster
2024-03-20  7:43 ` [PATCH 4/7] qapi: Rename QAPISchemaObjectType.variants to .branches Markus Armbruster
2024-03-20  7:43 ` [PATCH 5/7] qapi: Rename QAPISchemaAlternateType.variants to .alternatives Markus Armbruster
2024-03-20  7:43 ` [PATCH 6/7] qapi: Move conditional code from QAPISchemaVariants to its subtypes Markus Armbruster
2024-03-20  7:43 ` [PATCH 7/7] qapi: Simplify QAPISchemaVariants @tag_member Markus Armbruster

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).