qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC 05/19] qapi: Simplify c_enum_const()


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH RFC 05/19] qapi: Simplify c_enum_const()
Date: Mon, 13 Apr 2015 08:40:11 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 04/02/2015 11:28 AM, Markus Armbruster wrote:
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  scripts/qapi.py | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/scripts/qapi.py b/scripts/qapi.py
> index e1c5ef2..3601d1d 100644
> --- a/scripts/qapi.py
> +++ b/scripts/qapi.py
> @@ -906,6 +906,4 @@ def camel_to_upper(value):
>      return new_name.lstrip('_').upper()
>  
>  def c_enum_const(type_name, const_name):
> -    abbrev_string = camel_to_upper(type_name)
> -    value_string = camel_to_upper(const_name)
> -    return "%s_%s" % (abbrev_string, value_string)
> +    return camel_to_upper(type_name + '_' + const_name)

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]