mirror of
https://github.com/mii443/qemu.git
synced 2025-08-23 15:48:20 +00:00
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>
This commit is contained in:
committed by
Markus Armbruster
parent
857af5f06c
commit
d1f07c86c0
@ -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()
|
||||
|
Reference in New Issue
Block a user