From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBRQl-0003mr-AJ for qemu-devel@nongnu.org; Wed, 05 Oct 2011 09:22:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBRQj-0001lq-BR for qemu-devel@nongnu.org; Wed, 05 Oct 2011 09:22:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63311) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBRQi-0001lY-Mb for qemu-devel@nongnu.org; Wed, 05 Oct 2011 09:22:37 -0400 From: Luiz Capitulino Date: Wed, 5 Oct 2011 10:21:56 -0300 Message-Id: <1317820931-25872-12-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1317820931-25872-1-git-send-email-lcapitulino@redhat.com> References: <1317820931-25872-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 11/26] qapi: Don't use c_var() on enum strings List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@us.ibm.com Cc: qemu-devel@nongnu.org Otherwise if we have something like 'foo-bar' in the schema, it will be generated as 'foo_bar' in the string lookup table. c_var() is good for C variables, but not for enum strings. Signed-off-by: Luiz Capitulino --- scripts/qapi-types.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py index 4797a70..3bacc0c 100644 --- a/scripts/qapi-types.py +++ b/scripts/qapi-types.py @@ -70,7 +70,7 @@ const char *%(name)s_lookup[] = { ret += mcgen(''' "%(value)s", ''', - value=c_var(value).lower()) + value=value.lower()) ret += mcgen(''' NULL, -- 1.7.7.rc0.72.g4b5ea