[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 13/32] qapi: rename QAPISchemaEnumType.values to .mem
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL 13/32] qapi: rename QAPISchemaEnumType.values to .members |
Date: |
Thu, 13 Dec 2018 19:43:21 +0100 |
From: Marc-André Lureau <address@hidden>
Rename QAPISchemaEnumType.values and related variables to members.
Makes sense ever since commit 93bda4dd4 changed .values from list of
string to list of QAPISchemaMember. Obvious no-op.
Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
---
scripts/qapi/common.py | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py
index 7b62a4c7b0..046b7e5681 100644
--- a/scripts/qapi/common.py
+++ b/scripts/qapi/common.py
@@ -1161,22 +1161,22 @@ class QAPISchemaBuiltinType(QAPISchemaType):
class QAPISchemaEnumType(QAPISchemaType):
- def __init__(self, name, info, doc, ifcond, values, prefix):
+ def __init__(self, name, info, doc, ifcond, members, prefix):
QAPISchemaType.__init__(self, name, info, doc, ifcond)
- for v in values:
- assert isinstance(v, QAPISchemaMember)
- v.set_owner(name)
+ for m in members:
+ assert isinstance(m, QAPISchemaMember)
+ m.set_owner(name)
assert prefix is None or isinstance(prefix, str)
- self.values = values
+ self.members = members
self.prefix = prefix
def check(self, schema):
QAPISchemaType.check(self, schema)
seen = {}
- for v in self.values:
- v.check_clash(self.info, seen)
+ for m in self.members:
+ m.check_clash(self.info, seen)
if self.doc:
- self.doc.connect_member(v)
+ self.doc.connect_member(m)
def is_implicit(self):
# See QAPISchema._make_implicit_enum_type() and ._def_predefineds()
@@ -1186,7 +1186,7 @@ class QAPISchemaEnumType(QAPISchemaType):
return c_name(self.name)
def member_names(self):
- return [v.name for v in self.values]
+ return [m.name for m in self.members]
def json_type(self):
return 'string'
@@ -1403,9 +1403,9 @@ class QAPISchemaObjectTypeVariants(object):
if self._tag_name: # flat union
# branches that are not explicitly covered get an empty type
cases = set([v.name for v in self.variants])
- for val in self.tag_member.type.values:
- if val.name not in cases:
- v = QAPISchemaObjectTypeVariant(val.name, 'q_empty')
+ for m in self.tag_member.type.members:
+ if m.name not in cases:
+ v = QAPISchemaObjectTypeVariant(m.name, 'q_empty')
v.set_owner(self.tag_member.owner)
self.variants.append(v)
for v in self.variants:
--
2.17.2
- [Qemu-devel] [PULL 00/32] QAPI patches for 2018-12-13, Markus Armbruster, 2018/12/13
- [Qemu-devel] [PULL 03/32] qapi: Fix string-input-visitor to reject NaN and infinities, Markus Armbruster, 2018/12/13
- [Qemu-devel] [PULL 07/32] test-string-input-visitor: Use virtual walk, Markus Armbruster, 2018/12/13
- [Qemu-devel] [PULL 04/32] qapi: Use qemu_strtod_finite() in qobject-input-visitor, Markus Armbruster, 2018/12/13
- [Qemu-devel] [PULL 06/32] qapi: Rewrite string-input-visitor's integer and list parsing, Markus Armbruster, 2018/12/13
- [Qemu-devel] [PULL 08/32] test-string-input-visitor: Split off uint64 list tests, Markus Armbruster, 2018/12/13
- [Qemu-devel] [PULL 15/32] qapi: Do not define enumeration value explicitly, Markus Armbruster, 2018/12/13
- [Qemu-devel] [PULL 05/32] test-string-input-visitor: Add more tests, Markus Armbruster, 2018/12/13
- [Qemu-devel] [PULL 12/32] tests/qapi: Cover commands with 'if' and union / alternate 'data', Markus Armbruster, 2018/12/13
- [Qemu-devel] [PULL 31/32] qapi: add more conditions to SPICE, Markus Armbruster, 2018/12/13
- [Qemu-devel] [PULL 13/32] qapi: rename QAPISchemaEnumType.values to .members,
Markus Armbruster <=
- [Qemu-devel] [PULL 27/32] qapi: add #if conditions to generated code members, Markus Armbruster, 2018/12/13
- [Qemu-devel] [PULL 28/32] qapi: add 'If:' condition to enum values documentation, Markus Armbruster, 2018/12/13
- [Qemu-devel] [PULL 10/32] docs: Update references to JSON RFC, Markus Armbruster, 2018/12/13
- [Qemu-devel] [PULL 17/32] tests: print enum type members more like object type members, Markus Armbruster, 2018/12/13
- [Qemu-devel] [PULL 02/32] cutils: Fix qemu_strtosz() & friends to reject non-finite sizes, Markus Armbruster, 2018/12/13
- [Qemu-devel] [PULL 19/32] qapi: improve reporting of unknown or missing keys, Markus Armbruster, 2018/12/13
- [Qemu-devel] [PULL 30/32] qapi: add condition to variants documentation, Markus Armbruster, 2018/12/13
- [Qemu-devel] [PULL 14/32] qapi: break long lines at 'data' member, Markus Armbruster, 2018/12/13