diff options
| author | Eric Blake <eblake@redhat.com> | 2015-05-14 06:51:00 -0600 |
|---|---|---|
| committer | Markus Armbruster <armbru@redhat.com> | 2015-05-14 18:21:24 +0200 |
| commit | d1f07c86c05706facf950b0b0dba370f71fd5ef6 (patch) | |
| tree | 31f417913e96b1f24fd22b3e9976b65be57cfcd9 /scripts/qapi-visit.py | |
| parent | 857af5f06c3fb097d1bb6bc8a23b9992aac99e75 (diff) | |
| download | focaccia-qemu-d1f07c86c05706facf950b0b0dba370f71fd5ef6.tar.gz focaccia-qemu-d1f07c86c05706facf950b0b0dba370f71fd5ef6.zip | |
qapi: Support downstream alternates
Enhance the testsuite to cover downstream alternates, including whether the branch name or type is downstream. Update the generator to mangle alternate 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-visit.py')
| -rw-r--r-- | scripts/qapi-visit.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py index c15305ffac..e511be357d 100644 --- a/scripts/qapi-visit.py +++ b/scripts/qapi-visit.py @@ -202,11 +202,11 @@ void visit_type_%(name)s(Visitor *m, %(name)s **obj, const char *name, Error **e } switch ((*obj)->kind) { ''', - name=name) + name=c_name(name)) # For alternate, always use the default enum type automatically generated - # as "'%sKind' % (name)" - disc_type = '%sKind' % (name) + # as name + 'Kind' + disc_type = c_name(name) + 'Kind' for key in members: assert (members[key] in builtin_types.keys() |