[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 02/19] qapi-visit: Expose visit_type_FOO_memb
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v2 02/19] qapi-visit: Expose visit_type_FOO_members() |
Date: |
Wed, 02 Mar 2016 18:24:18 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Eric Blake <address@hidden> writes:
> Dan Berrange reported a case where he needs to work with a
> QCryptoBlockOptions union type using the OptsVisitor, but only
> visit one of the branches of that type (the discriminator is not
> visited directly, but learned externally). When things were
> boxed, it was easy: just visit the variant directly, which took
> care of both allocating the variant and visiting its members, then
> store that pointer in the union type. But now that things are
> unboxed, we need a way to visit the members without allocation,
> done by exposing visit_type_FOO_members() to the user.
>
> Before the patch, we had quite a bit of code associated with
> object_members_seen to make sure that a declaration of the helper
> was in scope before any use of the function. But now that the
> helper is public and declared in the header, the .c file no
> longer needs to worry about topological sorting (the helper is
> always in scope), which leads to some nice cleanups.
>
> Signed-off-by: Eric Blake <address@hidden>
>
> ---
> v2: Rebase atop s/fields/members/rename, don't provide useless
> declaration on alternates
I like this much better than v1. Thanks!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH v2 02/19] qapi-visit: Expose visit_type_FOO_members(),
Markus Armbruster <=