[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v9 02/17] qapi: Reserve '*List' type names for a
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v9 02/17] qapi: Reserve '*List' type names for arrays |
Date: |
Mon, 19 Oct 2015 18:14:58 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Eric Blake <address@hidden> writes:
> We already reserved '*Kind' for implicit enums (since commit
"We reserved '*Kind' since" sounds odd. Present tense?
> 4dc2e69), but failed to reserve '*List' for array types. Since
> no QMP was yet using it, we might as well make the reservation
> official.
Uhm, how can we fail to reserve something, and then make the reservation
official? I think what you're trying to say is something like
Type names ending in 'List' can clash with array types in generated
C. We don't currently use such names. Outlaw them.
Precedence: commit 4dc2e69 outlawed names ending in 'Kind', because
they can clash with implicit enum types of unions.
> Note that this forbids creation of new types or commands ending
> in 'List', but does NOT forbid abuse of attempts like ['intList']
> for creating a 2-dimensional array of 'int'.
Really? If I write ['T'], then T must be a declared type, mustn't it?
And after this patch, I cant declare type intList, can I?
> The whole idea of
> multi-dimensional arrays needs more design thought, best left for
> another day.
>
> Signed-off-by: Eric Blake <address@hidden>
Patch looks good to me.
- [Qemu-devel] [PATCH v9 11/17] net: Convert to new qapi union layout, (continued)
[Qemu-devel] [PATCH v9 13/17] input: Convert to new qapi union layout, Eric Blake, 2015/10/16
[Qemu-devel] [PATCH v9 02/17] qapi: Reserve '*List' type names for arrays, Eric Blake, 2015/10/16
- Re: [Qemu-devel] [PATCH v9 02/17] qapi: Reserve '*List' type names for arrays,
Markus Armbruster <=
[Qemu-devel] [PATCH v9 07/17] qapi: Start converting to new qapi union layout, Eric Blake, 2015/10/16
[Qemu-devel] [PATCH v9 12/17] char: Convert to new qapi union layout, Eric Blake, 2015/10/16
[Qemu-devel] [PATCH v9 06/17] qapi-visit: Remove redundant functions for flat union base, Eric Blake, 2015/10/16