[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v8 15/18] qapi: Move duplicate member checks to
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v8 15/18] qapi: Move duplicate member checks to schema check() |
Date: |
Tue, 13 Oct 2015 14:17:23 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 10/13/2015 12:32 PM, Markus Armbruster wrote:
> Eric Blake <address@hidden> 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
- [Qemu-devel] [PATCH v8 10/18] qapi: Move union tag quirks into subclass, (continued)
- [Qemu-devel] [PATCH v8 15/18] qapi: Move duplicate member checks to schema check(), Eric Blake, 2015/10/13
- Re: [Qemu-devel] [PATCH v8 15/18] qapi: Move duplicate member checks to schema check(), Markus Armbruster, 2015/10/13
- Re: [Qemu-devel] [PATCH v8 15/18] qapi: Move duplicate member checks to schema check(), Eric Blake, 2015/10/13
- Re: [Qemu-devel] [PATCH v8 15/18] qapi: Move duplicate member checks to schema check(), Markus Armbruster, 2015/10/13
- Re: [Qemu-devel] [PATCH v8 15/18] qapi: Move duplicate member checks to schema check(), Eric Blake, 2015/10/13
- Re: [Qemu-devel] [PATCH v8 15/18] qapi: Move duplicate member checks to schema check(), Markus Armbruster, 2015/10/13
- Re: [Qemu-devel] [PATCH v8 15/18] qapi: Move duplicate member checks to schema check(),
Eric Blake <=
- Re: [Qemu-devel] [PATCH v8 15/18] qapi: Move duplicate member checks to schema check(), Eric Blake, 2015/10/13
- Re: [Qemu-devel] [PATCH v8 15/18] qapi: Move duplicate member checks to schema check(), Markus Armbruster, 2015/10/14
- Re: [Qemu-devel] [PATCH v8 15/18] qapi: Move duplicate member checks to schema check(), Markus Armbruster, 2015/10/14
- Re: [Qemu-devel] [PATCH v8 15/18] qapi: Move duplicate member checks to schema check(), Eric Blake, 2015/10/14
- Re: [Qemu-devel] [PATCH v8 15/18] qapi: Move duplicate member checks to schema check(), Markus Armbruster, 2015/10/14
[Qemu-devel] [PATCH v8 18/18] qapi: Detect base class loops, Eric Blake, 2015/10/13
[Qemu-devel] [PATCH v8 16/18] qapi: Move duplicate enum value checks to schema check(), Eric Blake, 2015/10/13
[Qemu-devel] [PATCH v8 06.5/18] qapi: Drop redundant args-member-array test, Eric Blake, 2015/10/13