mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
qapi: Support downstream structs
Enhance the testsuite to cover downstream structs, including struct members and base structs. Update the generator to mangle the struct names in the appropriate places. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
fce384b8e5
commit
83a02706bb
4 changed files with 18 additions and 9 deletions
|
@ -45,7 +45,7 @@ typedef struct %(name)sList
|
|||
struct %(name)sList *next;
|
||||
} %(name)sList;
|
||||
''',
|
||||
name=name)
|
||||
name=c_name(name))
|
||||
|
||||
def generate_fwd_enum_struct(name, members):
|
||||
return mcgen('''
|
||||
|
@ -87,7 +87,7 @@ def generate_struct(expr):
|
|||
struct %(name)s
|
||||
{
|
||||
''',
|
||||
name=structname)
|
||||
name=c_name(structname))
|
||||
|
||||
if base:
|
||||
ret += generate_struct_fields({'base': base})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue