From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8C1j-0007by-8I for qemu-devel@nongnu.org; Thu, 15 Mar 2012 10:51:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S8C1O-0007EQ-Ly for qemu-devel@nongnu.org; Thu, 15 Mar 2012 10:51:38 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:58254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8C1O-0007E8-Ej for qemu-devel@nongnu.org; Thu, 15 Mar 2012 10:51:18 -0400 Received: by ggnj2 with SMTP id j2so3571410ggn.4 for ; Thu, 15 Mar 2012 07:51:16 -0700 (PDT) Sender: fluxion Date: Thu, 15 Mar 2012 09:51:10 -0500 From: Michael Roth Message-ID: <20120315145110.GI2894@illuin> References: <1331819618-12481-1-git-send-email-fsimonce@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1331819618-12481-1-git-send-email-fsimonce@redhat.com> Subject: Re: [Qemu-devel] [PATCH] qapi: escaping the dots in c_var List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Federico Simoncelli Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com 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 > --- > 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 > >