qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v7 10/14] qapi: Detect collisions in C member na


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v7 10/14] qapi: Detect collisions in C member names
Date: Fri, 9 Oct 2015 08:33:51 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 10/09/2015 08:11 AM, Markus Armbruster wrote:
> Eric Blake <address@hidden> writes:
> 
>> Detect attempts to declare two object members that would result
>> in the same C member name, by keying the 'seen' dictionary off
>> of the C name rather than the qapi name.  It also requires passing
>> info through some of the check() methods.
>>
>> This fixes two previously-broken tests, and the resulting error
>> messages demonstrate the utility of the .describe() method added
>> previously.  No change to generated code.
>>
>> Signed-off-by: Eric Blake <address@hidden>
>>

>> +++ b/tests/qapi-schema/args-name-clash.err
>> @@ -0,0 +1 @@
>> +tests/qapi-schema/args-name-clash.json:5: 'a_b' (member of oops arguments) 
>> collides with 'a-b' (member of oops arguments)
> 
> "(argument of oops)" would be better, but "(member of oops arguments)"
> will do.

May be possible to tweak the describe() function in the previous commit
along those lines, especially since I'm already tweaking it to not have
space in the generated name.  I'll have to play with it.

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