qemu-e2k/qapi
Eric Blake 29637a6ee9 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;
|         }
|     }

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1449033659-25497-10-git-send-email-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2015-12-17 08:21:29 +01:00
..
block-core.json blkdebug: Avoid '.' in enum values 2015-12-17 08:21:27 +01:00
block.json qapi: add missing @ 2015-10-08 19:46:47 +03:00
common.json qapi: Add alias for ErrorClass 2015-12-17 08:21:28 +01:00
crypto.json crypto: introduce new base module for TLS credentials 2015-09-15 14:47:37 +01:00
event.json migration: create migration event 2015-07-07 14:54:55 +02:00
introspect.json qapi: Document introspection stability considerations 2015-11-17 08:42:07 +01:00
Makefile.objs rename parse_enum_option to qapi_enum_parse and make it public 2014-09-08 11:12:43 +01:00
opts-visitor.c qapi: Simplify visits of optional fields 2015-12-17 08:21:29 +01:00
qapi-dealloc-visitor.c qapi: Introduce a first class 'any' type 2015-09-21 09:56:49 +02:00
qapi-util.c qom: Make enum string tables const-correct 2015-06-19 18:42:18 +02:00
qapi-visit-core.c qapi: Shorter visits of optional fields 2015-12-17 08:21:29 +01:00
qmp-dispatch.c qapi: Add alias for ErrorClass 2015-12-17 08:21:28 +01:00
qmp-event.c qapi/qmp-event.c: Don't manually include os-win32.h/os-posix.h 2015-08-19 16:29:53 +01:00
qmp-input-visitor.c qapi: Simplify visits of optional fields 2015-12-17 08:21:29 +01:00
qmp-output-visitor.c qapi: Introduce a first class 'any' type 2015-09-21 09:56:49 +02:00
qmp-registry.c
rocker.json qmp/hmp: add rocker device support 2015-06-12 13:42:17 +01:00
string-input-visitor.c qapi: Simplify visits of optional fields 2015-12-17 08:21:29 +01:00
string-output-visitor.c Include qapi/qmp/qerror.h exactly where needed 2015-06-22 18:20:41 +02:00
trace.json qapi: Use 'struct' instead of 'type' in schema 2015-05-05 18:39:01 +02:00