unicorn/qemu/qapi
Eric Blake 994490d197
qapi: Shorter visits of optional fields
For less code, reflect the determined boolean value of an optional
visit back to the caller instead of making the caller read the
boolean after the fact.

The resulting generated code has the following diff:

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

Backports commit 29637a6ee913df8fcdf371426ee48956b945b618 from qemu
2018-02-19 22:03:23 -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: Shorter visits of optional fields 2018-02-19 22:03:23 -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