Skip to content

string-input-visitor: Support enum/bool alternate types

Eduardo Habkost qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 12 repliesIn review
  2. v14 patches 23 repliesSuperseded

Changes in v2 from the cover letter

* Updated string_input_visitor_new() documentation
to mention alternate support (Markus Armbruster)
* Detect ambiguous alternates at runtime. Test case included.
* Removed support for integers. We don't need it yet, and it would require sorting out the parse_str() mess.
* Change supported_qtypes to uint32_t (Eric Blake)
* Replace assert() on all generated visitor functions with a single QEMU_BUILD_BUG_ON() on visit_start_alternate() (Eric Blake)
* Extra spaces around "|" on generated visitor code (Eric Blake)
* Don't use bitops.h and just use (1U << QTYPE_FOO) (Markus Armbruster)
* Update tests/qapi-schema/qapi-schema-test.out to match qapi-schema-test.json updates
* New patch: qapi: Add enum_table[] parameter to start_alternate (needed to detect ambiguous alternates)
* Code indentation fix (Markus Armbruster)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3visitor: Add 'supported_qtypes' parameter to visit_start_alternate()include/qapi/visitor-impl.h include/qapi/visitor.h qapi/qapi-clone-visitor.c +5 more+25 -174 replies
2/3qapi: Add enum_table[] parameter to start_alternateinclude/qapi/visitor-impl.h include/qapi/visitor.h qapi/qapi-clone-visitor.c +5 more+30 -74 replies
3/3string-input-visitor: Support alternate typesinclude/qapi/string-input-visitor.h qapi/string-input-visitor.c tests/qapi-schema/qapi-schema-test.json +2 more+187 -114 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchEric BlakeMarkus Armbruster
1/3R-b R-b
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 0/3] string-input-visitor: Support enum/bool alternate types

v1 was originally part of the following series:

[PATCH 0/4] x86: Support "-cpu feature=force"

But as I am not sure yet "feature=force" is the right way to go, I decided to send only the string-input-visitor alternate support, in case the QAPI maintainers want to merge it anyway.

Changes v1 -> v2:
* Updated string_input_visitor_new() documentation
to mention alternate support (Markus Armbruster)
* Detect ambiguous alternates at runtime. Test case included.
* Removed support for integers. We don't need it yet, and it would require sorting out the parse_str() mess.
* Change supported_qtypes to uint32_t (Eric Blake)
* Replace assert() on all generated visitor functions with a single QEMU_BUILD_BUG_ON() on visit_start_alternate() (Eric Blake)
* Extra spaces around "|" on generated visitor code (Eric Blake)
* Don't use bitops.h and just use (1U << QTYPE_FOO) (Markus Armbruster)
* Update tests/qapi-schema/qapi-schema-test.out to match qapi-schema-test.json updates
* New patch: qapi: Add enum_table[] parameter to start_alternate (needed to detect ambiguous alternates)
* Code indentation fix (Markus Armbruster)

Eduardo Habkost (3):
visitor: Add 'supported_qtypes' parameter to visit_start_alternate()
qapi: Add enum_table[] parameter to start_alternate
string-input-visitor: Support alternate types

 include/qapi/visitor.h                  | 13 ++++-
 include/qapi/visitor-impl.h             |  4 +-
 scripts/qapi-visit.py                   | 17 ++++--
 include/qapi/string-input-visitor.h     |  6 +-
 qapi/qapi-visit-core.c                  | 12 +++-
 qapi/qapi-clone-visitor.c               |  4 +-
 qapi/qapi-dealloc-visitor.c             |  4 +-
 qapi/qobject-input-visitor.c            |  7 ++-
 qapi/string-input-visitor.c             | 99 +++++++++++++++++++++++++++++----
 tests/test-string-input-visitor.c       | 76 +++++++++++++++++++++++++
 qapi/trace-events                       |  2 +-
 tests/qapi-schema/qapi-schema-test.json |  8 +++
 tests/qapi-schema/qapi-schema-test.out  |  9 +++
 13 files changed, 234 insertions(+), 27 deletions(-)
Signature · 1 line
2.11.0.259.g40922b1