Rather than making 2/3 callers explode a list just to have it
be reconstructed, instead fix the remaining caller to wrap its
arguments in a list.

Signed-off-by: Eric Blake <ebl...@redhat.com>
---

Markus was right

 scripts/qapi.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/scripts/qapi.py b/scripts/qapi.py
index bebd8c7..c107c4b 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -1241,20 +1241,20 @@ class QAPISchema(object):
         self.the_empty_object_type = QAPISchemaObjectType(':empty', None, None,
                                                           [], None)
         self._def_entity(self.the_empty_object_type)
-        qtype_values = self._make_enum_members('none', 'qnull', 'qint',
-                                               'qstring', 'qdict', 'qlist',
-                                               'qfloat', 'qbool')
+        qtype_values = self._make_enum_members(['none', 'qnull', 'qint',
+                                                'qstring', 'qdict', 'qlist',
+                                                'qfloat', 'qbool'])
         self._def_entity(QAPISchemaEnumType('QType', None, qtype_values,
                                             'QTYPE'))

-    def _make_enum_members(self, *values):
+    def _make_enum_members(self, values):
         return [QAPISchemaMember(v) for v in values]

     def _make_implicit_enum_type(self, name, info, values):
         # See also QAPISchemaObjectTypeMember._pretty_owner()
         name = name + 'Kind'   # Use namespace reserved by add_name()
         self._def_entity(QAPISchemaEnumType(
-            name, info, self._make_enum_members(*values), None))
+            name, info, self._make_enum_members(values), None))
         return name

     def _make_array_type(self, element_type, info):
@@ -1278,7 +1278,7 @@ class QAPISchema(object):
         data = expr['data']
         prefix = expr.get('prefix')
         self._def_entity(QAPISchemaEnumType(
-            name, info, self._make_enum_members(*data), prefix))
+            name, info, self._make_enum_members(data), prefix))

     def _make_member(self, name, typ, info):
         optional = False
-- 
2.4.3


Reply via email to