aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi-types.py
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2015-05-14 06:50:57 -0600
committerMarkus Armbruster <armbru@redhat.com>2015-05-14 18:21:13 +0200
commit83a02706bb1fd31c93eab755de543dfe228682d4 (patch)
tree2308a27e06b553170fe9b9d27beb5e3b9a0a67ed /scripts/qapi-types.py
parentfce384b8e5193e02421f6b2c2880f3684abcbdc0 (diff)
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>
Diffstat (limited to 'scripts/qapi-types.py')
-rw-r--r--scripts/qapi-types.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py
index 1593fc6561..51181512bf 100644
--- a/scripts/qapi-types.py
+++ b/scripts/qapi-types.py
@@ -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})