unicorn/qemu/scripts
Markus Armbruster a0d6b16297
qapi: Fix up commit 7618b91's clash sanity checking change
This hunk

@@ -964,6 +965,7 @@ class QAPISchemaObjectType(QAPISchemaType):
members = []
seen = {}
for m in members:
+ assert c_name(m.name) not in seen
seen[m.name] = m
for m in self.local_members:
m.check(schema, members, seen)

is plainly broken.

Asserting the members inherited from base don't clash is somewhat
redundant, because self.base.check() just checked that. But it
doesn't hurt.

The idea to use c_name(m.name) instead of m.name for collision
checking is sound, because we need to catch clashes between the m.name
and between the c_name(m.name), and when two m.name clash, then their
c_name() also clash.

However, using c_name(m.name) instead of m.name in one of several
places doesn't work. See the very next line.

Keep the assertion, but drop the c_name() for now. A future commit
will bring it back.

Backports commit 08683353fc46b5d462199c9e8cff6f6c67f20f65 from qemu
2018-02-19 20:14:22 -05:00
..
create_config more cleanup qemu/configure 2017-01-19 14:11:54 +08:00
make_device_config.sh
ordereddict.py
qapi-event.py qapi: Share gen_visit_fields() 2018-02-19 18:41:41 -05:00
qapi-types.py qapi-types: Simplify gen_struct_field[s] 2018-02-19 20:06:38 -05:00
qapi-visit.py qapi: Track simple union tag in object.local_members 2018-02-19 20:02:03 -05:00
qapi.py qapi: Fix up commit 7618b91's clash sanity checking change 2018-02-19 20:14:22 -05:00