[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-4.0 v7 11/27] qapi: pass long form enum to m
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH for-4.0 v7 11/27] qapi: pass long form enum to make_enum_members |
Date: |
Mon, 10 Dec 2018 18:04:56 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Marc-André Lureau <address@hidden> writes:
> This will allow to get rid of short form handling in a following
> patch.
>
> Signed-off-by: Marc-André Lureau <address@hidden>
> Suggested-by: Markus Armbruster <address@hidden>
> ---
> scripts/qapi/common.py | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py
> index fdc0fd69ef..557b413950 100644
> --- a/scripts/qapi/common.py
> +++ b/scripts/qapi/common.py
> @@ -1663,9 +1663,10 @@ class QAPISchema(object):
> self.the_empty_object_type = QAPISchemaObjectType(
> 'q_empty', None, None, None, None, [], None)
> self._def_entity(self.the_empty_object_type)
> - qtype_values = self._make_enum_members(['none', 'qnull', 'qnum',
> - 'qstring', 'qdict', 'qlist',
> - 'qbool'])
> +
> + qtypes = ['none', 'qnull', 'qnum', 'qstring', 'qdict', 'qlist',
> 'qbool']
Long line.
> + qtype_values = self._make_enum_members([{'name': n} for n in qtypes])
> +
> self._def_entity(QAPISchemaEnumType('QType', None, None, None,
> qtype_values, 'QTYPE'))
We may want to squash this one into PATCH 08 as mentioned in that
patch's review.
In case we don't:
Reviewed-by: Markus Armbruster <address@hidden>
- Re: [Qemu-devel] [PATCH for-4.0 v7 06/27] qapi: factor out checking for keys, (continued)
- [Qemu-devel] [PATCH for-4.0 v7 08/27] qapi: add a dictionary form with 'name' key for enum members, Marc-André Lureau, 2018/12/08
- [Qemu-devel] [PATCH for-4.0 v7 07/27] qapi: improve reporting of unknown or missing keys, Marc-André Lureau, 2018/12/08
- [Qemu-devel] [PATCH for-4.0 v7 09/27] qapi: add 'if' to enum members, Marc-André Lureau, 2018/12/08
- [Qemu-devel] [PATCH for-4.0 v7 10/27] qapi-events: add 'if' condition to implicit event enum, Marc-André Lureau, 2018/12/08
- [Qemu-devel] [PATCH for-4.0 v7 11/27] qapi: pass long form enum to make_enum_members, Marc-André Lureau, 2018/12/08
- Re: [Qemu-devel] [PATCH for-4.0 v7 11/27] qapi: pass long form enum to make_enum_members,
Markus Armbruster <=
- [Qemu-devel] [PATCH for-4.0 v7 12/27] qapi: rename allow_dict to allow_implicit, Marc-André Lureau, 2018/12/08
- [Qemu-devel] [PATCH for-4.0 v7 13/27] qapi: add a dictionary form for TYPE, Marc-André Lureau, 2018/12/08
- [Qemu-devel] [PATCH for-4.0 v7 14/27] qapi: add 'if' to implicit struct members, Marc-André Lureau, 2018/12/08
- [Qemu-devel] [PATCH for-4.0 v7 15/27] qapi: add an error in case a discriminator is conditional, Marc-André Lureau, 2018/12/08