[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qapi: escaping the dots in c_var
From: |
Michael Roth |
Subject: |
Re: [Qemu-devel] [PATCH] qapi: escaping the dots in c_var |
Date: |
Thu, 15 Mar 2012 10:42:40 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Mar 15, 2012 at 12:03:30PM -0300, Luiz Capitulino wrote:
> On Thu, 15 Mar 2012 09:51:10 -0500
> Michael Roth <address@hidden> 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 <address@hidden>
> > > ---
> > > 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 <address@hidden>