qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: pbonzini@redhat.com, Federico Simoncelli <fsimonce@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qapi: escaping the dots in c_var
Date: Thu, 15 Mar 2012 10:42:40 -0500	[thread overview]
Message-ID: <20120315154240.GJ2894@illuin> (raw)
In-Reply-To: <20120315120330.5d368f24@doriath.home>

On Thu, Mar 15, 2012 at 12:03:30PM -0300, Luiz Capitulino wrote:
> On Thu, 15 Mar 2012 09:51:10 -0500
> Michael Roth <mdroth@linux.vnet.ibm.com> wrote:
> 
> > On Thu, Mar 15, 2012 at 01:53:38PM +0000, Federico Simoncelli wrote:
> > > This allows qapi commands and types with dots.
> > > 
> > > Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
> > > ---
> > >  scripts/qapi.py |    2 +-
> > >  1 files changed, 1 insertions(+), 1 deletions(-)
> > > 
> > > diff --git a/scripts/qapi.py b/scripts/qapi.py
> > > index 6e05469..4090c55 100644
> > > --- a/scripts/qapi.py
> > > +++ b/scripts/qapi.py
> > > @@ -131,7 +131,7 @@ def camel_case(name):
> > >      return new_name
> > > 
> > >  def c_var(name):
> > > -    return '_'.join(name.split('-')).lstrip("*")
> > > +    return name.replace('-', '_').replace('.', '_').lstrip('*')
> > 
> > What are you looking to use this for? The general rule so far has been to
> > always use "-" as the word delimiter.
> 
> Downstream extensions of QMP (commands, events, etc) are fully qualified
> domain names, and hence contain dots.
> 

Ahh, thanks. Patch looks good :)

Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>

  reply	other threads:[~2012-03-15 15:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-15 13:53 [Qemu-devel] [PATCH] qapi: escaping the dots in c_var Federico Simoncelli
2012-03-15 14:51 ` Michael Roth
2012-03-15 15:03   ` Luiz Capitulino
2012-03-15 15:42     ` Michael Roth [this message]
2012-03-15 15:45 ` [Qemu-devel] [PATCH v2] qapi: escaping dots in c_var and in de_camel_case Federico Simoncelli
2012-03-16 19:16   ` Luiz Capitulino
2012-03-20 13:54     ` [Qemu-devel] [PATCH v3] qapi: add c_fun to escape function names Federico Simoncelli
2012-03-23 20:38       ` Luiz Capitulino
2012-03-26 20:07       ` Anthony Liguori

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=20120315154240.GJ2894@illuin \
    --to=mdroth@linux.vnet.ibm.com \
    --cc=fsimonce@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).