Eric Blake <ebl...@redhat.com> writes: > On 09/16/2015 05:06 AM, Markus Armbruster wrote: >> Fixes flat unions to get the base's base members. Test case is from >> commit 2fc0043, in qapi-schema-test.json: >> >> { 'union': 'UserDefFlatUnion', >> 'base': 'UserDefUnionBase', >> 'discriminator': 'enum1', >> 'data': { 'value1' : 'UserDefA', >> 'value2' : 'UserDefB', >> 'value3' : 'UserDefB' } } >> >> { 'struct': 'UserDefUnionBase', >> 'base': 'UserDefZero', >> 'data': { 'string': 'str', 'enum1': 'EnumOne' } } >> >> { 'struct': 'UserDefZero', >> 'data': { 'integer': 'int' } } >> >> Patch's effect on UserDefFlatUnion: >> >> struct UserDefFlatUnion { >> /* Members inherited from UserDefUnionBase: */ >> + int64_t integer; >> char *string; > > There is another change not listed here. When you were developing with > scaffolding patches, you split the 'typedef struct UserDefFlatUnion {' > into two lines in that patch, and then the diff seen by this patch when > generating the commit message didn't see anything change. But now that > you reverted the scaffolding out of the series, it is now THIS patch > that is converting from inline: > > typedef struct UserDefFlatUnion { > ... > } UserDefFlatUnion; > > to the separate: > > typedef struct UserDefFlatUnion; > ... > struct UserDefFlatUnion { > ... > }; > > >> -def generate_fwd_struct(name): >> +def gen_fwd_object_or_array(name): >> return mcgen(''' >> >> typedef struct %(name)s %(name)s; >> - >> -typedef struct %(name)sList { >> - union { >> - %(name)s *value; >> - uint64_t padding; >> - }; >> - struct %(name)sList *next; >> -} %(name)sList; >> ''', >> name=c_name(name)) >> >> -def generate_fwd_enum_struct(name): >> +def gen_array(name, element_type): >> return mcgen(''' >> >> -typedef struct %(name)sList { >> +struct %(name)s { > > My R-b still stands, but it would be nice to update this commit message > to reflect that this change was intentional.
Can do. Thanks!