qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] scripts: qapi-event.py: support vendor extensio


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] scripts: qapi-event.py: support vendor extension
Date: Thu, 10 Jul 2014 10:13:46 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 07/10/2014 08:31 AM, Markus Armbruster wrote:
> Luiz Capitulino <address@hidden> writes:
> 
>> The event code generator barfs when it sees a dot in an event
>> argument, this makes it impossible to support vendor extensions
>> in event arguments as they always contain dots. Fix this by
>> replacing dots by hyphens in the generated code.
> 
> Code replaces by underbar, not hyphen.
> 
>> PS: Event names and QMP command arguments may suffer from the
>> same issue, but I'm not checking/fixing them today.
>>
>> Signed-off-by: Luiz Capitulino <address@hidden>
>> ---

>> +# Should be used where vendor extensions are supported
>> +def c_arg(name):
>> +    return c_var(name).replace('.', '_')
>> +
>>  def c_list_type(name):
>>      return '%sList' % name
> 
> Can anybody think of a use of c_var() that needs '.' preserved?

If the generator spits out any comments, those comments should refer to
the QMP wire name, including the '.'. But right now, generated code
doesn't seem to do that.

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