[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v12 36/36] qapi: Shorter visits of optional fiel
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v12 36/36] qapi: Shorter visits of optional fields |
Date: |
Wed, 18 Nov 2015 20:04:08 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Eric Blake <address@hidden> writes:
> 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 <address@hidden>
Feels like a wash to me, but I'm willing to take it anyway, in
recognition of the massive amount of work you've been doing in this area
:)
- [Qemu-devel] [PATCH v12 23/36] qapi: Remove dead tests for max collision, (continued)
- [Qemu-devel] [PATCH v12 23/36] qapi: Remove dead tests for max collision, Eric Blake, 2015/11/18
- [Qemu-devel] [PATCH v12 32/36] qapi: Inline _make_implicit_tag(), Eric Blake, 2015/11/18
- [Qemu-devel] [PATCH v12 30/36] qapi: Convert QType into qapi builtin enum type, Eric Blake, 2015/11/18
- [Qemu-devel] [PATCH v12 34/36] qapi: Add positive tests to qapi-schema-test, Eric Blake, 2015/11/18
- [Qemu-devel] [PATCH v12 36/36] qapi: Shorter visits of optional fields, Eric Blake, 2015/11/18
- Re: [Qemu-devel] [PATCH v12 36/36] qapi: Shorter visits of optional fields,
Markus Armbruster <=
- [Qemu-devel] [PATCH v12 22/36] qapi: Don't let implicit enum MAX member collide, Eric Blake, 2015/11/18
- [Qemu-devel] [PATCH v12 24/36] cpu: Convert CpuInfo into flat union, Eric Blake, 2015/11/18
[Qemu-devel] [PATCH v12 20/36] blkdebug: Avoid '.' in enum values, Eric Blake, 2015/11/18