[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v7 29/31] qapi: Simplify semantics of visit_next
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v7 29/31] qapi: Simplify semantics of visit_next_list() |
Date: |
Thu, 10 Dec 2015 21:04:52 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 12/10/2015 10:32 AM, Eric Blake wrote:
> On 12/07/2015 08:55 PM, Eric Blake wrote:
>
>> We can greatly simplify things by hoisting the special case
>> into the start() routine, and flipping the order in the loop
>> to visit before advance:
>>
>> start(head)
>> element = *head
>> while (element) {
>> visit(element)
>> element = next(element)
>> }
>>
> Looking at this, it is inconsistent with start_struct (where name comes
> AFTER the object); that is, I think this should probably be:
>
> void (*start_list)(Visitor *v, GenericList **list, const char *name,
> Error **errp);
>
> although I'll still wait for review comments before respinning.
I've also bisected this patch as causing assertion failures in
qemu-iotests 041 and 139, so I'll have to sort that out on the respin.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v7 09/31] qapi: Prefer type_int64 over type_int in visitors, (continued)
- [Qemu-devel] [PATCH v7 09/31] qapi: Prefer type_int64 over type_int in visitors, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 23/31] qapi: Fix command with named empty argument type, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 26/31] qapi-visit: Unify struct and union visit, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 27/31] qapi: Rework deallocation of partial struct, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 25/31] qapi: Canonicalize missing object to :empty, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 28/31] qapi: Split visit_end_struct() into pieces, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 29/31] qapi: Simplify semantics of visit_next_list(), Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 16/31] qmp: Don't abuse stack to track qmp-output root, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 17/31] qapi: Document visitor interfaces, add assertions, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 31/31] RFC: qapi: Adjust layout of FooList types, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 30/31] qapi: Change visit_type_FOO() to no longer return partial objects, Eric Blake, 2015/12/07