[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v10 04/25] qapi: Reserve '*List' type names for
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v10 04/25] qapi: Reserve '*List' type names for list types |
Date: |
Fri, 23 Oct 2015 14:53:16 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Eric Blake <address@hidden> writes:
> Type names ending in 'List' can clash with qapi list types in
> generated C. We don't currently use such names. It is easier to
> outlaw them now than to worry about how to resolve such a clash
> in the future. For precedence, see commit 4dc2e69, which did the
> same for names ending in 'Kind' versus implicit enum types for
> qapi unions.
>
> Note that this only forbids explicit creation of new (non-array)
> types or commands ending in 'List'; the parser already rejects
> attempts to use ['intList'] as the type for an object member
> (although 'intList' happens to be the C spelling for the qapi
> type ['int'], that does not make it a recognized name in qapi).
> Whether we later turn on support for multi-dimensional arrays
> (via [['int']], not ['intList']) is a design decision best left
> for another day.
I'd drop this paragraph, because I find it distracting. Its first
sentence boils down to "we reject type names you didn't declare", but it
takes some mental effort to figure that out. The second sentence talks
about a design detail of a possible future extension. Neither is
necessary to understand this commit.
> Update the testsuite to match.
>
> Signed-off-by: Eric Blake <address@hidden>
Patch looks good.
[Qemu-devel] [PATCH v10 07/25] qapi-visit: Split off visit_type_FOO_fields forward decl, Eric Blake, 2015/10/23
[Qemu-devel] [PATCH v10 10/25] qapi: Unbox base members, Eric Blake, 2015/10/23