Received: from eggs.gnu.org ([2001:4830:134:3::10]:53278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiIHA-0001bb-HV for qemu-devel@nongnu.org; Wed, 15 Apr 2015 04:02:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YiIH4-0001Zw-Rj for qemu-devel@nongnu.org; Wed, 15 Apr 2015 04:02:24 -0400 Received: from smtp3.mundo-r.com ([212.51.32.191]:21147 helo=smtp4.mundo-r.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiIH4-0001UW-Kl for qemu-devel@nongnu.org; Wed, 15 Apr 2015 04:02:18 -0400 From: Alberto Garcia In-Reply-To: <1428775783-18082-2-git-send-email-eblake@redhat.com> References: <1428775783-18082-1-git-send-email-eblake@redhat.com> <1428775783-18082-2-git-send-email-eblake@redhat.com> Date: Wed, 15 Apr 2015 10:01:37 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 1/4] qapi: Fix C identifiers generated for names containing '.' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: kwolf@redhat.com, akong@redhat.com, armbru@redhat.com, mdroth@linux.vnet.ibm.com On S=C3=A1b 11 Abr 2015 20:09:40 CEST, Eric Blake wrote: > From: Markus Armbruster > > c_fun() maps '.' to '_', c_var() doesn't. Nothing prevents '.' in > QAPI names that get passed to c_var(). > > Which QAPI names get passed to c_fun(), to c_var(), or to both is not > obvious. Names of command parameters and struct type members get > passed to c_var(). > > c_var() strips a leading '*', but this cannot happen. c_fun() > doesn't. > > Fix c_var() to work exactly like c_fun(). > > Perhaps they should be replaced by a single mapping function. > > Signed-off-by: Markus Armbruster > [add 'import string'] > Signed-off-by: Eric Blake Reviewed-by: Alberto Garcia Berto