]> www.infradead.org Git - users/dwmw2/qemu.git/commit
qapi: Plumb in 'boxed' to qapi generator lower levels
authorEric Blake <eblake@redhat.com>
Thu, 14 Jul 2016 03:50:19 +0000 (21:50 -0600)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 19 Jul 2016 11:21:08 +0000 (13:21 +0200)
commit48825ca419fd9c8140d4fecb24e982d68ebca74f
treee78c93a6fade2af3d5e17fd04af841302cc63880
parent4d0b268fdb17a1fed10fe980e77fd388e5427bfd
qapi: Plumb in 'boxed' to qapi generator lower levels

The next patch will add support for passing a qapi union type
as the 'data' of a command.  But to do that, the user function
for implementing the command, as called by the generated
marshal command, must take the corresponding C struct as a
single boxed pointer, rather than a breakdown into one
parameter per member.  Even without a union, being able to use
a C struct rather than a list of parameters can make it much
easier to handle coding with QAPI.

This patch adds the internal plumbing of a 'boxed' flag
associated with each command and event.  In several cases,
this means adding indentation, with one new dead branch and
the remaining branch being the original code more deeply
nested; this was done so that the new implementation in the
next patch is easier to review without also being mixed with
indentation changes.

For this patch, no behavior or generated output changes, other
than the testsuite outputting the value of the new flag
(always False for now).

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1468468228-27827-9-git-send-email-eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Identifier box renamed to boxed in two places]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
scripts/qapi-commands.py
scripts/qapi-event.py
scripts/qapi-introspect.py
scripts/qapi.py
tests/qapi-schema/event-case.out
tests/qapi-schema/ident-with-escape.out
tests/qapi-schema/indented-expr.out
tests/qapi-schema/qapi-schema-test.out
tests/qapi-schema/test-qapi.py