qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 0/7] qapi: Refactor QAPISchemaVariants


From: Markus Armbruster
Subject: [PATCH 0/7] qapi: Refactor QAPISchemaVariants
Date: Wed, 20 Mar 2024 08:43:08 +0100

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]