qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 08/16] qapi: Tidy c_type logic


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v4 08/16] qapi: Tidy c_type logic
Date: Thu, 14 May 2015 09:39:44 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 05/14/2015 06:50 AM, Eric Blake wrote:
> c_type() is designed to be called on both string names and on
> array designations, so 'name' is a bit misleading because it
> operates on more than strings.  Also, no caller ever passes
> an empty string.  Finally, + notation is a bit nicer to read
> than '%s' % value for string concatenation.
> 
> Signed-off-by: Eric Blake <address@hidden>
> 
> ---

>      else:
> -        return '%s *%s' % (name, eatspace)
> +        # complex type name
> +        assert isinstance(value, str) and str != ""

D'oh - that should be 'value != ""'.

-- 
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]