qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 10/19] qapi: Better error messages for duplic


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v4 10/19] qapi: Better error messages for duplicated expressions
Date: Wed, 24 Sep 2014 08:10:31 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0

On 09/24/2014 05:58 AM, Markus Armbruster wrote:

> 
> We have separate name spaces for events, commands and types.  Works for
> me.  A single name space would work for me, too.

I thought about that too.  Our conventions are that commands are
all-lower-case, events are ALL_UPPER, and user-defined types are
CamelCase - so a single namespace would not have any collisions, except
for one case: built-in types like 'int' are also all lower, which
collides with commands.  But I see no technical reason why we wouldn't
be able to generate C code for a command named 'int'.  I can go either
way, but should probably add a test for a .json file that does
{'command':'int'} to test which way we go.  Preferences on whether that
should be allowed or forbidden?

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