Addresses Markus' comments on v4; the series was pretty close, and most of the changes here are a new naming scheme ('q_obj' rather than ':obj') and additional cleanups (for example, c_null() is unused). I dropped patch 10, but the new patches make the series a bit longer.
Built directly on master qemu.git. Also available as a tag at this location: git fetch git://repo.or.cz/qemu/ericb.git qapi-implicit-v5 and will soon be part of my branch at: http://repo.or.cz/qemu/ericb.git/shortlog/refs/heads/qapi v4: https://lists.gnu.org/archive/html/qemu-devel/2016-03/msg01205.html 001/14:[0001] [FC] 'qapi: Assert in places where variants are not handled' 002/14:[----] [--] 'qapi: Fix command with named empty argument type' 003/14:[----] [--] 'qapi: Make c_type() more OO-like' 004/14:[down] 'qapi: Adjust names of implicit types' 005/14:[0019] [FC] 'qapi: Emit implicit structs in generated C' 006/14:[down] 'qapi-event: Slightly shrink generated code' 007/14:[0055] [FC] 'qapi: Utilize implicit struct visits' 008/14:[----] [--] 'qapi-commands: Inline single-use helpers of gen_marshal()' 009/14:[down] 'qapi: Inline gen_visit_members() into lone caller' 010/14:[down] 'qapi: Drop unused c_null()' 011/14:[0001] [FC] 'qapi: Don't special-case simple union wrappers' 012/14:[down] 'qapi: Make BlockdevOptions doc example closer to reality' 013/14:[0026] [FC] 'qapi: Allow anonymous base for flat union' 014/14:[0002] [FC] 'qapi: Use anonymous bases in QMP flat unions' Eric Blake (14): qapi: Assert in places where variants are not handled qapi: Fix command with named empty argument type qapi: Make c_type() more OO-like qapi: Adjust names of implicit types qapi: Emit implicit structs in generated C qapi-event: Slightly shrink generated code qapi: Utilize implicit struct visits qapi-commands: Inline single-use helpers of gen_marshal() qapi: Inline gen_visit_members() into lone caller qapi: Drop unused c_null() qapi: Don't special-case simple union wrappers qapi: Make BlockdevOptions doc example closer to reality qapi: Allow anonymous base for flat union qapi: Use anonymous bases in QMP flat unions scripts/qapi.py | 171 ++++++++++++----------------- scripts/qapi-commands.py | 117 ++++++++------------ scripts/qapi-event.py | 58 +++++++--- scripts/qapi-types.py | 29 ++--- scripts/qapi-visit.py | 65 +++++------ backends/baum.c | 2 +- backends/msmouse.c | 2 +- block/nbd.c | 6 +- block/qcow2.c | 6 +- block/vmdk.c | 8 +- blockdev.c | 24 ++-- hmp.c | 8 +- hw/char/escc.c | 2 +- hw/input/hid.c | 8 +- hw/input/ps2.c | 6 +- hw/input/virtio-input-hid.c | 8 +- hw/mem/pc-dimm.c | 2 +- net/dump.c | 2 +- net/hub.c | 2 +- net/l2tpv3.c | 2 +- net/net.c | 4 +- net/netmap.c | 2 +- net/slirp.c | 2 +- net/socket.c | 2 +- net/tap-win32.c | 2 +- net/tap.c | 4 +- net/vde.c | 2 +- net/vhost-user.c | 2 +- numa.c | 4 +- qemu-char.c | 82 +++++++------- qemu-nbd.c | 6 +- replay/replay-input.c | 44 ++++---- spice-qemu-char.c | 14 ++- tests/test-io-channel-socket.c | 40 +++---- tests/test-qmp-commands.c | 7 +- tests/test-qmp-input-visitor.c | 25 +++-- tests/test-qmp-output-visitor.c | 24 ++-- tpm.c | 2 +- ui/console.c | 4 +- ui/input-keymap.c | 10 +- ui/input-legacy.c | 8 +- ui/input.c | 34 +++--- ui/vnc-auth-sasl.c | 3 +- ui/vnc.c | 29 ++--- util/qemu-sockets.c | 35 +++--- docs/qapi-code-gen.txt | 98 ++++++++--------- qapi-schema.json | 20 +--- qapi/block-core.json | 98 ++++++++--------- qapi/introspect.json | 12 +- tests/qapi-schema/comments.out | 2 +- tests/qapi-schema/empty.out | 2 +- tests/qapi-schema/event-case.out | 2 +- tests/qapi-schema/flat-union-bad-base.err | 2 +- tests/qapi-schema/flat-union-bad-base.json | 5 +- tests/qapi-schema/ident-with-escape.out | 8 +- tests/qapi-schema/include-relpath.out | 2 +- tests/qapi-schema/include-repetition.out | 2 +- tests/qapi-schema/include-simple.out | 2 +- tests/qapi-schema/indented-expr.out | 2 +- tests/qapi-schema/qapi-schema-test.json | 8 +- tests/qapi-schema/qapi-schema-test.out | 166 ++++++++++++++-------------- 61 files changed, 648 insertions(+), 702 deletions(-) -- 2.5.0