Marc-André Lureau <marcandre.lur...@redhat.com> writes: > This is the second part of the "add #if pre-processor conditions to > generated code" series, adding schema member conditions (roughly > 16-38/49). > > Members can be exploded as dictionnary with 'type'/'if' keys: > > { 'struct': 'TestIfStruct', 'data': > { 'foo': 'int', > 'bar': { 'type': 'int', 'if': 'defined(TEST_IF_STRUCT_BAR)'} } } > > Enum values can be exploded as dictionnary with 'type'/'if' keys: > > { 'enum': 'TestIfEnum', 'data': > [ 'foo', > { 'name' : 'bar', 'if': 'defined(TEST_IF_ENUM_BAR)' } ] }
PATCH 03,18,20,25 are only losely related to this second part. They are also ready. Queued on branch qapi-next in my public repository, with PATCH 18 and 20 squashed together. I took the liberty to implement the the idea on normalization I mentioned in review of PATCH 08. I also squashed a few patches that are essentially fixups into the patches they fix. I did not address any other review comments. Result is on branch qapi-if-2. Please have a look.