From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN19R-0006R3-LR for qemu-devel@nongnu.org; Thu, 28 Aug 2014 10:58:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XN19J-0000H1-Ne for qemu-devel@nongnu.org; Thu, 28 Aug 2014 10:58:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27546) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN19J-0000Gi-G3 for qemu-devel@nongnu.org; Thu, 28 Aug 2014 10:58:05 -0400 Message-ID: <53FF4370.1010208@redhat.com> Date: Thu, 28 Aug 2014 16:57:52 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <53FF3764.20603@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH memory v2 3/3] memory: Lazy init name from QOM name as needed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Peter Maydell , Stefano Stabellini , "qemu-devel@nongnu.org Developers" , Stefan Weil Il 28/08/2014 16:27, Peter Crosthwaite ha scritto: > Yeh, so a solution to that was to patch qom to drop the [*] for > singletons added via arrayified property adders. One possible semantic > that I can think of is the 0th element always has a property alias so > that foo and foo[0] mean the same thing. This tricky part is, when > "[1]" comes along the preferred name (the canonical path) for the 0th > element should switch from "foo" to "foo[0]". Is it sane to switch > child and alias strings for "[0]" when "[1]" comes along? You and I both know that the right solution is to move the [*] from memory.c to the callers... :) Paolo