[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: |
Luiz Capitulino |
Subject: |
Re: [Qemu-devel] [PATCH] qapi: escaping the dots in c_var |
Date: |
Thu, 15 Mar 2012 12:03:30 -0300 |
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.