mirror of
https://github.com/yuzu-mirror/unicorn.git
synced 2026-04-21 06:13:54 +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. Backports commit d1f07c86c05706facf950b0b0dba370f71fd5ef6 from qemu
This commit is contained in:
parent
4292c61dbe
commit
2dcd6722fa
3 changed files with 8 additions and 19 deletions
|
|
@ -203,11 +203,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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue