On 12/13/2013 01:49 PM, Kevin Wolf wrote:
> Am 13.12.2013 um 18:10 hat Max Reitz geschrieben:
>> Introduce an alias "error" for "errno", since using the latter for QMP
>> is sure to result in various syntax errors due to the name being used
>> directly as an identifier.
>>
>> Signed-off-by: Max Reitz <mre...@redhat.com>
> 
> I can't say I like this, but it seems we don't have an option.

Don't we already have a way to use QMP keys that collide with C keywords
(for example, "unix" in qapi's SocketAddress becomes "q_unix" in C)?
Why can't we reuse that mechanism, and just add "errno" to the polluted
words list so that the generated C code uses "q_errno" rather than
having to invent an "error" alias?

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