[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 01/12] qapi: Move GenericList to qapi/util.h

From: Eric Blake
Subject: Re: [PATCH v5 01/12] qapi: Move GenericList to qapi/util.h
Date: Mon, 26 Oct 2020 09:22:50 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1

On 10/26/20 9:18 AM, Markus Armbruster wrote:
> Eric Blake <eblake@redhat.com> writes:
>> Placing GenericList in util.h will make it easier for the next patch
>> to promote QAPI_LIST_ADD() into a public macro without requiring more
>> files to include the unrelated visitor.h.
> Is this true?
> You don't actually need GenericList to make use of QAPI_LIST_ADD(), do
> you?  Any QAPI list type should do.

Correct, compilation still works if I drop this patch.

>> However, we can't also move GenericAlternate; this is because it would
>> introduce a circular dependency: qapi-builtin-types.h needs a complete
>> definition of QEnumLookup (so it includes qapi/util.h), and
>> GenericAlternate needs a complete definition of QType (declared in
>> qapi-builtin-types.h).  Leaving GenericAlternate in visitor.h breaks
>> the cycle, and doesn't matter since we don't have any further planned
>> uses for that type outside of visitors.
>> Suggested-by: Markus Armbruster <armbru@redhat.com>
> I did suggest to consider moving GenericList and GenericAlternate next
> to QAPI_LIST_ADD(), because they're (loosely) related.  We can't move
> GenericAlternate.  Moving only GenericList brings GenericList and
> QAPI_LIST_ADD() together, but separates the more closely related
> GenericList and GenericAlternate.  Meh.
> I'd leave it put.

Agreed. Dropping this patch in v6.

Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]