From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43203) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpVnz-0006KP-Ch for qemu-devel@nongnu.org; Fri, 23 Oct 2015 02:26:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZpVnw-0001Kz-8C for qemu-devel@nongnu.org; Fri, 23 Oct 2015 02:26:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40241) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpVnw-0001Kv-3F for qemu-devel@nongnu.org; Fri, 23 Oct 2015 02:26:20 -0400 From: Markus Armbruster References: <1444968943-11254-1-git-send-email-eblake@redhat.com> <1444968943-11254-6-git-send-email-eblake@redhat.com> <8737x591xz.fsf@blackfin.pond.sub.org> <56266704.2060403@redhat.com> <87pp08ny5g.fsf@blackfin.pond.sub.org> <5629924D.9050400@redhat.com> Date: Fri, 23 Oct 2015 08:26:17 +0200 In-Reply-To: <5629924D.9050400@redhat.com> (Eric Blake's message of "Thu, 22 Oct 2015 19:50:05 -0600") Message-ID: <87fv12qewm.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v9 05/17] qapi: Unbox base members List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Luiz Capitulino , Gerd Hoffmann , qemu-devel@nongnu.org, Michael Roth Eric Blake writes: > On 10/21/2015 07:34 AM, Markus Armbruster wrote: > >> >> The least verbose naming convention for a conversion function I can >> think of right now is TBase(), where T is the name of a type with a >> base. Compare: >> >> foo((Parent *)child, blah) >> foo(ChildBase(child), blah) >> >> Tolerable? Worthwhile? > > 'TBase' won't work. We already have BlockdevOptionsBase as a subtype of > BlockdevOptions, and using 'TBase' would give us > 'BlockdevOptionsBase(options)' which is now ambiguous between the type > name and intended function call. I'll probably go with > qapi_TYPE_base(), and see how long that looks. I'd have no problem with renaming things that don't impact wire ABI. A quick grep suggests churn would be minimal.