[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.9 13/47] qapi: Fix QAPISchemaEnumType.is_i
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH for-2.9 13/47] qapi: Fix QAPISchemaEnumType.is_implicit() for 'QType' |
Date: |
Tue, 14 Mar 2017 11:03:08 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 03/13/2017 01:18 AM, Markus Armbruster wrote:
> Missed in commit 7264f5c. Harmless, because nothing checks whether an
> enumeration type is implicit so far.
Obviously, a later patch will care about implicit types, and choked
without this ;)
>
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
> scripts/qapi.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Eric Blake <address@hidden>
>
> diff --git a/scripts/qapi.py b/scripts/qapi.py
> index e6d023f..7a2b6ab 100644
> --- a/scripts/qapi.py
> +++ b/scripts/qapi.py
> @@ -1148,8 +1148,8 @@ class QAPISchemaEnumType(QAPISchemaType):
> v.check_clash(self.info, seen)
>
> def is_implicit(self):
> - # See QAPISchema._make_implicit_enum_type()
> - return self.name.endswith('Kind')
> + # See QAPISchema._make_implicit_enum_type() and ._def_predefineds()
> + return self.name.endswith('Kind') or self.name == 'QType'
>
> def c_type(self):
> return c_name(self.name)
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH for-2.9 02/47] qapi: Make doc comments optional where we don't need them, (continued)
- [Qemu-devel] [PATCH for-2.9 09/47] qapi: Fix to reject empty union base gracefully, Markus Armbruster, 2017/03/13
- [Qemu-devel] [PATCH for-2.9 01/47] qapi: Factor QAPISchemaParser._include() out of .__init__(), Markus Armbruster, 2017/03/13
- [Qemu-devel] [PATCH for-2.9 10/47] qapi2texi: Fix up output around #optional, Markus Armbruster, 2017/03/13
- [Qemu-devel] [PATCH for-2.9 13/47] qapi: Fix QAPISchemaEnumType.is_implicit() for 'QType', Markus Armbruster, 2017/03/13
- Re: [Qemu-devel] [PATCH for-2.9 13/47] qapi: Fix QAPISchemaEnumType.is_implicit() for 'QType',
Eric Blake <=
- [Qemu-devel] [PATCH for-2.9 06/47] qapi: Have each QAPI schema declare its name rule violations, Markus Armbruster, 2017/03/13
- [Qemu-devel] [PATCH for-2.9 20/47] qapi2texi: Plainer enum value and member name formatting, Markus Armbruster, 2017/03/13
- [Qemu-devel] [PATCH for-2.9 07/47] qapi: Clean up build of generated documentation, Markus Armbruster, 2017/03/13
- [Qemu-devel] [PATCH for-2.9 22/47] qapi2texi: Explain enum value undocumentedness more clearly, Markus Armbruster, 2017/03/13