qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>,
	Luiz Capitulino <lcapitulino@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>, wenchaoqemu@gmail.com
Subject: Re: [Qemu-devel] [PATCH] scripts: qapi-event.py: support vendor extension
Date: Thu, 10 Jul 2014 10:13:46 -0600	[thread overview]
Message-ID: <53BEBBBA.5000509@redhat.com> (raw)
In-Reply-To: <87fvi9i8tx.fsf@blackfin.pond.sub.org>

[-- Attachment #1: Type: text/plain, Size: 1146 bytes --]

On 07/10/2014 08:31 AM, Markus Armbruster wrote:
> Luiz Capitulino <lcapitulino@redhat.com> 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 <lcapitulino@redhat.com>
>> ---

>> +# 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  parent reply	other threads:[~2014-07-10 16:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-08 18:17 [Qemu-devel] [PATCH] scripts: qapi-event.py: support vendor extension Luiz Capitulino
2014-07-09 15:43 ` [Qemu-devel] [PATCH for-2.1?] " Eric Blake
2014-07-09 16:08   ` Luiz Capitulino
2014-07-10 14:31 ` [Qemu-devel] [PATCH] " Markus Armbruster
2014-07-10 14:36   ` Luiz Capitulino
2014-07-11 14:42     ` Markus Armbruster
2014-07-11 15:38       ` Eric Blake
2014-07-11 16:01         ` Markus Armbruster
2014-07-11 18:51           ` Luiz Capitulino
2014-07-11 21:22             ` Eric Blake
2014-07-14 18:12               ` Luiz Capitulino
2014-07-14 18:31                 ` Eric Blake
2014-07-14 18:32                   ` Luiz Capitulino
2014-07-10 16:13   ` Eric Blake [this message]
2014-07-23 14:19 ` Wenchao Xia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53BEBBBA.5000509@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wenchaoqemu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).