[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v8.5 1/4] qapi: Drop all_members parameter from
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v8.5 1/4] qapi: Drop all_members parameter from check() |
Date: |
Tue, 3 Nov 2015 07:12:56 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 11/03/2015 07:02 AM, Markus Armbruster wrote:
>>> I'm afraid you're omitting a few steps here, and I think you missed
>>> QAPISchemaObjectVariants.check()'s self.tag_member.check().
>>
>> There is no self.tag_member.check(), any more; rather, my earlier
>> patches have reworked things so that tag_member is checked by the owner
>> (a flat union's base type, a simple union's local_members, or directly
>> in QAPISchemaAlternateType prior to calling Variants.check()). I guess
>> that's a pitfall of seeing this patch without my rework of 5/17 to
>> address your comments there.
>
> I'm assuming this patch is based on
> [PATCH v8 06/17] qapi-types: Consolidate gen_struct() and gen_union()
> which has
>
> def check(self, schema, members, seen):
> if self.tag_name: # flat union
> self.tag_member = seen[self.tag_name]
> elif seen: # simple union
> assert self.tag_member in seen.itervalues()
> else: # alternate
> ---> self.tag_member.check(schema, members, seen)
>
> in QAPISchemaObjectTypeVariants.
That was true in v8, but not in my pending v9 which did essentially what
your 7/7 did (move the tag_member.check() into Alternate.check() back in
patch 5).
At any rate, my first glance of your series shows that it is reasonable,
so my task today is to spit out a v9 of my series, but using your seven
patches in place of my four.
> Yes, we're almost certainly headed in the same direction. But I got
> thoroughly confused and lost in the details on the way, so I had to hack
> things up myself to clear my head. The result looks nice to me, so I'll
> send it out in a jiffie in the hope you'll find it useful.
>
Yes, it should make v9 easier when it includes your patches, because
then you know what to look for :)
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v8 07/17] qapi: Rework collision assertions, Markus Armbruster, 2015/11/02
- [Qemu-devel] [PATCH 1/7] qapi: Drop obsolete tag value collision assertions, Markus Armbruster, 2015/11/03
- [Qemu-devel] [PATCH 2/7] qapi: Simplify QAPISchemaObjectTypeMember.check(), Markus Armbruster, 2015/11/03
- [Qemu-devel] [PATCH 7/7] qapi: QAPISchemaObjectTypeVariants.check(), Markus Armbruster, 2015/11/03
- [Qemu-devel] [PATCH 4/7] qapi: Fix up commit 7618b91's clash sanity checking change, Markus Armbruster, 2015/11/03
- [Qemu-devel] [PATCH 5/7] qapi: Eliminate QAPISchemaObjectType.check() variable members, Markus Armbruster, 2015/11/03
- [Qemu-devel] [PATCH 3/7] qapi: Clean up after previous commit, Markus Armbruster, 2015/11/03
- [Qemu-devel] [PATCH 6/7] qapi: Factor out QAPISchemaObjectTypeMember.check_clash(), Markus Armbruster, 2015/11/03
[Qemu-devel] [PATCH v8.5 2/4] qapi: Check for QMP collisions of flat union branches, Eric Blake, 2015/11/02