From patchwork Thu Mar 15 13:53:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Simoncelli X-Patchwork-Id: 146969 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 141E7B6FA1 for ; Fri, 16 Mar 2012 00:55:10 +1100 (EST) Received: from localhost ([::1]:47712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8B92-0002eJ-0l for incoming@patchwork.ozlabs.org; Thu, 15 Mar 2012 09:55:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34482) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8B8U-0002T1-Vh for qemu-devel@nongnu.org; Thu, 15 Mar 2012 09:55:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S8B86-0000pJ-H0 for qemu-devel@nongnu.org; Thu, 15 Mar 2012 09:54:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55868) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8B86-0000ow-8b for qemu-devel@nongnu.org; Thu, 15 Mar 2012 09:54:10 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2FDs7nV027662 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 15 Mar 2012 09:54:07 -0400 Received: from vm-rhdev1.in1.bytenix.com (ovpn-116-31.ams2.redhat.com [10.36.116.31]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q2FDs5wZ015705; Thu, 15 Mar 2012 09:54:06 -0400 From: Federico Simoncelli To: qemu-devel@nongnu.org Date: Thu, 15 Mar 2012 13:53:38 +0000 Message-Id: <1331819618-12481-1-git-send-email-fsimonce@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: pbonzini@redhat.com, Federico Simoncelli , lcapitulino@redhat.com Subject: [Qemu-devel] [PATCH] qapi: escaping the dots in c_var X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This allows qapi commands and types with dots. Signed-off-by: Federico Simoncelli Reviewed-by: Michael Roth --- 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('*') def c_list_type(name): return '%sList' % name