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 <fsimo...@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. > > def c_list_type(name): > return '%sList' % name > -- > 1.7.1 > >