unicorn/qemu/qapi
Eric Blake e5b2cff2bd
qmp: Support explicit null during visits
Implement the new type_null() callback for the qmp input and
output visitors. While we don't yet have a use for this in QAPI
input (the generator will need some tweaks first), some
potential usages have already been discussed on the list.
Meanwhile, the output visitor could already output explicit null
via type_any, but this gives us finer control.

At any rate, it's easy to test that we can round-trip an explicit
null through manual use of visit_type_null() wrapped by a virtual
visit_start_struct() walk, even if we can't do the visit in a
QAPI type. Repurpose the test_visitor_out_empty test,
particularly since a future patch will tighten semantics to
forbid use of qmp_output_get_qobject() without at least one
intervening visit_type_*.

Backports commit 3df016f185521f8dfa5bd89168722887156405c7 from qemu
2018-02-23 19:02:18 -05:00
..
common.json qapi: Add alias for ErrorClass 2018-02-19 20:38:51 -05:00
Makefile.objs remove glib dependency by provide compatible replacements 2016-12-18 14:56:58 -08:00
qapi-dealloc-visitor.c qapi: Add visit_type_null() visitor 2018-02-23 15:48:57 -05:00
qapi-visit-core.c qapi: Add visit_type_null() visitor 2018-02-23 15:48:57 -05:00
qmp-input-visitor.c qmp: Support explicit null during visits 2018-02-23 19:02:18 -05:00
qmp-output-visitor.c qmp: Support explicit null during visits 2018-02-23 19:02:18 -05:00
string-input-visitor.c qapi: Guarantee NULL obj on input visitor callback error 2018-02-23 14:53:23 -05:00