From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsvFt-0000Vo-Qy for qemu-devel@nongnu.org; Thu, 14 May 2015 11:41:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsvFm-0007xP-LL for qemu-devel@nongnu.org; Thu, 14 May 2015 11:41:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55770) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsvFm-0007w4-Dl for qemu-devel@nongnu.org; Thu, 14 May 2015 11:40:54 -0400 From: Markus Armbruster References: <1431607862-9238-1-git-send-email-eblake@redhat.com> <1431607862-9238-10-git-send-email-eblake@redhat.com> Date: Thu, 14 May 2015 17:40:09 +0200 In-Reply-To: <1431607862-9238-10-git-send-email-eblake@redhat.com> (Eric Blake's message of "Thu, 14 May 2015 06:50:55 -0600") Message-ID: <87lhgrw4km.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v4 09/16] qapi: Make c_type() consistently convert qapi names List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, akong@redhat.com, berto@igalia.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com Eric Blake writes: > Continuing the string of cleanups for supporting downstream names > containing '.', this patch focuses on ensuring c_type() can > handle a downstream name. This patch alone does not fix the > places where generator output should be calling this function > but was open-coding things instead, but it gets us a step closer. > > In particular, the changes to c_list_type() and type_name() mean > that type_name(FOO) now handles the case when FOO contains '.', > '-', or is a ticklish identifier other than a builtin (builtins > are exempted because ['int'] must remain mapped to 'intList' and > not 'q_intList'). Meanwhile, ['unix'] now maps to 'q_unixList' > rather than 'unixList', to match the fact that 'unix' is ticklish; > however, our naming conventions state that complex types should > start with a capital, so no type name following conventions will > ever have the 'q_' prepended. > > Likewise, changes to c_type() mean that c_type(FOO) properly > handles an enum or complex type FOO with '.' or '-' in the > name, or is a ticklish identifier (again, a ticklish identifier > as a type name violates conventions). > > Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster