Received: from eggs.gnu.org ([2001:4830:134:3::10]:47868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGlMt-0001nE-27 for qemu-devel@nongnu.org; Fri, 21 Feb 2014 03:22:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGlMm-0002yr-4o for qemu-devel@nongnu.org; Fri, 21 Feb 2014 03:21:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:6738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGlMl-0002ym-T8 for qemu-devel@nongnu.org; Fri, 21 Feb 2014 03:21:52 -0500 From: Markus Armbruster References: <1392875695-15627-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1392875695-15627-11-git-send-email-xiawenc@linux.vnet.ibm.com> <87r46xvi5j.fsf@blackfin.pond.sub.org> <5306410F.30709@redhat.com> Date: Fri, 21 Feb 2014 09:21:46 +0100 In-Reply-To: <5306410F.30709@redhat.com> (Eric Blake's message of "Thu, 20 Feb 2014 10:53:19 -0700") Message-ID: <87ppmgq3j9.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH V7 10/11] qapi script: do not add "_" for every capitalized char in enum List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, Wenchao Xia , mdroth@linux.vnet.ibm.com Eric Blake writes: > On 02/20/2014 09:54 AM, Markus Armbruster wrote: >>> + # When c is upper and no "_" appears before, do more checks >>> + if c.isupper() and (i > 0) and c_fun_str[i - 1] != "_": >> >> c_fun_str[i - 1]... what if i == 0? > > How? We already had '(i > 0) and' prior to the use of i-1. Blind on both eyes, sorry for the noise %-}