[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 00/16] qapi: Rework mapping of enum value to str
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 00/16] qapi: Rework mapping of enum value to string |
Date: |
Fri, 01 Sep 2017 14:43:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Markus Armbruster <address@hidden> writes:
> The purpose of this work is to make holes in QAPI enumerations
> possible.
>
> Why holes? Because we want to be able to suppress enumeration
> constants with #if. Holes could be avoided, e.g. by letting the
> compiler assign the values. Falls apart when the conditions are
> target-specific, because then target-specific code would get different
> values.
>
> Why are holes a problem? The tables mapping enumeration constants to
> strings use a NULL sentinel.
>
> This is PATCH 06-13 of "[PATCH v2 00/54] qapi: add #if pre-processor
> conditions to generated code" reworked for reviewability. Took a bit
> of time, but it was probably less work and certainly more fun than
> reviewing the old PATCH 06 and 12 (almost 300 hunks!) in sufficient
> depth would have been.
Applied to qapi-next.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH 00/16] qapi: Rework mapping of enum value to string,
Markus Armbruster <=