Markus Armbruster <arm...@redhat.com> 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.