unicorn/qemu/qapi
Eric Blake f3d2380f6d
qapi: Simplify visits of optional fields
None of the visitor callbacks would set an error when testing
if an optional field was present; make this part of the interface
contract by eliminating the errp argument.

The resulting generated code has a nice diff:

|- visit_optional(v, &has_fdset_id, "fdset-id", &err);
|- if (err) {
|- goto out;
|- }
|+ visit_optional(v, &has_fdset_id, "fdset-id");
| if (has_fdset_id) {
| visit_type_int(v, &fdset_id, "fdset-id", &err);
| if (err) {
| goto out;
| }
| }

Backports commit 5cdc8831a795fb8452d7e34f644202fd724e122a from qemu
2018-02-19 22:01:27 -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: Introduce a first class 'any' type 2018-02-19 17:46:58 -05:00
qapi-visit-core.c qapi: Simplify visits of optional fields 2018-02-19 22:01:27 -05:00
qmp-input-visitor.c qapi: Simplify visits of optional fields 2018-02-19 22:01:27 -05:00
qmp-output-visitor.c qapi: Introduce a first class 'any' type 2018-02-19 17:46:58 -05:00
string-input-visitor.c qapi: Simplify visits of optional fields 2018-02-19 22:01:27 -05:00