On 10/13/2015 12:32 PM, Markus Armbruster wrote: > Eric Blake <[email protected]> writes: > >> On 10/13/2015 11:13 AM, Markus Armbruster wrote: >> >>>>> >>>>> I've come to the conclusion that we should get rid of the self-inflicted >>>>> pain before we attempt to detect all collisions. >>>> >>>> Then that sounds like I should try harder to get the kind/type naming, >>>> the boxed base naming, and even the anonymous union naming all hoisted >>>> into this subset, and spin a v9? >>> >>> I can take PATCH 01-09,12 into my tree right away, with PATCH 07's two >>> redundant is_implicit() methods dropped, and PATCH 12's comment touched >>> up. >> >> Okay. > > Done & pushed to http://repo.or.cz/qemu/armbru.git branch qapi-next.
I didn't see any mentioned changes on patch 7, at least not in commit
4ad5066. Last paragraph of the commit message would also need a
massage, if you do want to squash it in:
Instead, add an is_implicit() method to QAPISchemaEntity, and use it.
It can be overridden later for ObjectType and EnumType, when implicit
instances of those classes gain info.
diff --git a/scripts/qapi.py b/scripts/qapi.py
index e263ecf..d7cf0f3 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -903,10 +903,6 @@ class QAPISchemaEnumType(QAPISchemaType):
def check(self, schema):
assert len(set(self.values)) == len(self.values)
- def is_implicit(self):
- # See QAPISchema._make_implicit_enum_type()
- return self.name[-4:] == 'Kind'
-
def c_type(self, is_param=False):
return c_name(self.name)
@@ -977,10 +973,6 @@ class QAPISchemaObjectType(QAPISchemaType):
self.variants.check(schema, members, seen)
self.members = members
- def is_implicit(self):
- # See QAPISchema._make_implicit_object_type()
- return self.name[0] == ':'
-
def c_name(self):
assert not self.is_implicit()
return QAPISchemaType.c_name(self)
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
