unicorn/qemu/include/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
..
qmp qapi: Convert QType into QAPI built-in enum type 2018-02-19 21:47:05 -05:00
dealloc-visitor.h import 2015-08-21 15:04:50 +08:00
error.h qapi: Change munging of CamelCase enum values 2018-02-19 20:40:15 -05:00
qmp-input-visitor.h import 2015-08-21 15:04:50 +08:00
qmp-output-visitor.h import 2015-08-21 15:04:50 +08:00
string-input-visitor.h import 2015-08-21 15:04:50 +08:00
visitor-impl.h qapi: Simplify visits of optional fields 2018-02-19 22:01:27 -05:00
visitor.h qapi: Shorter visits of optional fields 2018-02-19 22:03:23 -05:00