From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33777) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8CpL-0003S3-E1 for qemu-devel@nongnu.org; Thu, 15 Mar 2012 11:42:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S8CpE-0002sw-3j for qemu-devel@nongnu.org; Thu, 15 Mar 2012 11:42:54 -0400 Received: from mail-pz0-f47.google.com ([209.85.210.47]:62152) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8CpD-0002sg-Qb for qemu-devel@nongnu.org; Thu, 15 Mar 2012 11:42:48 -0400 Received: by dado14 with SMTP id o14so5406992dad.34 for ; Thu, 15 Mar 2012 08:42:45 -0700 (PDT) Sender: fluxion Date: Thu, 15 Mar 2012 10:42:40 -0500 From: Michael Roth Message-ID: <20120315154240.GJ2894@illuin> References: <1331819618-12481-1-git-send-email-fsimonce@redhat.com> <20120315145110.GI2894@illuin> <20120315120330.5d368f24@doriath.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120315120330.5d368f24@doriath.home> 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: Luiz Capitulino Cc: pbonzini@redhat.com, Federico Simoncelli , qemu-devel@nongnu.org On Thu, Mar 15, 2012 at 12:03:30PM -0300, Luiz Capitulino wrote: > On Thu, 15 Mar 2012 09:51:10 -0500 > Michael Roth 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 > > > --- > > > 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