Received: from eggs.gnu.org ([2001:4830:134:3::10]:38134) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XopSh-0004Vk-JW for qemu-devel@nongnu.org; Thu, 13 Nov 2014 03:09:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XopSb-0004iq-1Y for qemu-devel@nongnu.org; Thu, 13 Nov 2014 03:09:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XopSa-0004iV-QJ for qemu-devel@nongnu.org; Thu, 13 Nov 2014 03:08:56 -0500 From: Markus Armbruster References: <1415812130-2592-1-git-send-email-armbru@redhat.com> <54639524.3060205@redhat.com> Date: Thu, 13 Nov 2014 09:08:52 +0100 In-Reply-To: <54639524.3060205@redhat.com> (Paolo Bonzini's message of "Wed, 12 Nov 2014 18:13:08 +0100") Message-ID: <87wq6zmsiz.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: peter.crosthwaite@xilinx.com, qemu-devel@nongnu.org, afaerber@suse.de Paolo Bonzini writes: > On 12/11/2014 18:08, Markus Armbruster wrote: >> "Automatic arrayification" is a convenience feature for creating a >> bunch of properties with a common type, accessors and so forth, named >> in a peculiar way: "foo[0]", "foo[1]", ... It's implemented by making >> property names ending with "[*]" magical. The magic is uncalled for, >> as names can be just as well generated separately from adding >> properties. >> >> See also >> https://lists.nongnu.org/archive/html/qemu-devel/2014-10/msg00623.html > > I dislike having the caller free the property name. It is decent as you > used it here, but it won't be usable if we later try and avoid making > all memory region names array-ified. > > I like the idea, but the API is just too ugly. :( Unfortunately I have > nothing better to propose. For what it's worth, three out of four uses already need to free, because they append "[*]" to an argument string. Can you explain what you mean by "avoid making all memory region names array-ified", and why my API won't be usable for that?