From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbUMx-00085G-Qm for qemu-devel@nongnu.org; Wed, 30 Oct 2013 07:55:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbUMr-0001iB-Mo for qemu-devel@nongnu.org; Wed, 30 Oct 2013 07:55:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9452) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbUMr-0001i5-Cs for qemu-devel@nongnu.org; Wed, 30 Oct 2013 07:55:21 -0400 Message-ID: <5270F3A2.8010105@redhat.com> Date: Wed, 30 Oct 2013 12:55:14 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1382321765-29052-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1382321765-29052-4-git-send-email-xiawenc@linux.vnet.ibm.com> <5265917D.3000903@redhat.com> <20131029181845.GA25726@dhcp-200-207.str.redhat.com> <5270B4DC.9040608@linux.vnet.ibm.com> In-Reply-To: <5270B4DC.9040608@linux.vnet.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 3/6] qapi: rename prefix QEVENT to Q_EVENT List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: Kevin Wolf , armbru@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, stefanha@redhat.com Il 30/10/2013 08:27, Wenchao Xia ha scritto: > =E4=BA=8E 2013/10/30 2:18, Kevin Wolf =E5=86=99=E9=81=93: >> Am 21.10.2013 um 22:41 hat Eric Blake geschrieben: >>> On 10/21/2013 03:16 AM, Wenchao Xia wrote: >>>> The define will be moved to qapi-schema.json later, so rename the >>>> prefix to match its naming style. >>> Wouldn't it be simpler to fix the code generator to special case QEve= nt >>> to turn into QEVENT, instead of having to go through this churn? But= if >>> we _like_ the Q_EVENT_ prefix, then this looks fairly mechanical: >> Or rather, instead of special casing QEvent, it shouldn't insert >> underscores if there is nothing between the two capital letters. ... but it should still insert one before the very last capital letter. For example AIOType should become AIO_TYPE, not AIOTYPE. >> I've had a similar case with AIO in the blockdev-add series; and while >> renaming it to Aio worked, this kind of thing doesn't seem to be a rar= e >> exception in practice, so it might be worth adjusting the generator. > > It seems the right way, will adjust the generator. I think even if you adjusted it, it would be a no-op in this case. For example: AIOType =3D> AIO_TYPE QEvent =3D> Q_EVENT Paolo