From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XorKq-0008Pv-Kl for qemu-devel@nongnu.org; Thu, 13 Nov 2014 05:09:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XorKh-0001cy-K4 for qemu-devel@nongnu.org; Thu, 13 Nov 2014 05:09:04 -0500 Received: from mail-wg0-x235.google.com ([2a00:1450:400c:c00::235]:41215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XorKh-0001cq-EA for qemu-devel@nongnu.org; Thu, 13 Nov 2014 05:08:55 -0500 Received: by mail-wg0-f53.google.com with SMTP id b13so16422684wgh.40 for ; Thu, 13 Nov 2014 02:08:54 -0800 (PST) Sender: Paolo Bonzini Message-ID: <54648333.2050808@redhat.com> Date: Thu, 13 Nov 2014 11:08:51 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1415812130-2592-1-git-send-email-armbru@redhat.com> <54639524.3060205@redhat.com> <87wq6zmsiz.fsf@blackfin.pond.sub.org> In-Reply-To: <87wq6zmsiz.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: peter.crosthwaite@xilinx.com, qemu-devel@nongnu.org, afaerber@suse.de On 13/11/2014 09:08, Markus Armbruster wrote: >> > >> > 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. Yes, your API works well for the cases it's replacing now. > 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? Basically removing the "[*]" from memory_region_init, and instead adding it to all callers. It can then be removed from those callers that do not need array-ification, which is most of them. But you would still need it in most non-qdevified devices. In that case, the parent of the MemoryRegions is just /machine; hence, just having two serial ports gives you two same-named memory regions. So non-qdevified devices would require surgery to add object_gen_new_property_name, and they exactly those that one doesn't want to touch. :) If everything were qdevified, I agree that object_gen_new_property_name would be a fine API. Paolo