qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v8 03/26] qapi: QAPISchema code generation helpe


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v8 03/26] qapi: QAPISchema code generation helper methods
Date: Wed, 16 Sep 2015 09:11:12 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

On 09/16/2015 05:06 AM, Markus Armbruster wrote:
> New methods c_name(), c_type(), c_null(), json_type(),
> alternate_qtype().
> 
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  scripts/qapi.py | 94 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++-----
>  1 file changed, 87 insertions(+), 7 deletions(-)
> 

> @@ -790,6 +830,16 @@ class QAPISchemaEnumType(QAPISchemaType):
>      def check(self, schema):
>          assert len(set(self.values)) == len(self.values)
>  
> +    def c_type(self, is_param=False):
> +        return c_name(self.name)
> +
> +    def c_null(self):
> +        return c_enum_const(self.name, (self.values + ['MAX'])[0],
> +                            self.prefix)

Yep, that becomes important in later patches.

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]