From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ri0C4-0004I6-Ot for qemu-devel@nongnu.org; Tue, 03 Jan 2012 03:58:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ri0C3-0005L2-O0 for qemu-devel@nongnu.org; Tue, 03 Jan 2012 03:58:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:62845) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ri0C3-0005Kt-AO for qemu-devel@nongnu.org; Tue, 03 Jan 2012 03:58:03 -0500 Message-ID: <4F02C316.2070606@redhat.com> Date: Tue, 03 Jan 2012 09:57:58 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1324399916-21315-1-git-send-email-aliguori@us.ibm.com> <1324399916-21315-2-git-send-email-aliguori@us.ibm.com> <4F01F075.2070706@redhat.com> <4F025757.2060106@codemonkey.ws> In-Reply-To: <4F025757.2060106@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/27] qom: add the base Object class List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Anthony Liguori , qemu-devel@nongnu.org, Markus Armbruster On 01/03/2012 02:18 AM, Anthony Liguori wrote: >> >> 2) Why do you need a list for the interface objects at all? You can make >> obj->interfaces point to a single blob, and initialize the objects in >> place. You >> only need to store the number of interfaces into the TypeImpl or in >> the object >> header, or add a dummy Interface at the end whose contents are all-zero. > > Interfaces aren't really handled in a special way. You could easily > make it so that the infrastructure could be modified to allow true > multiple inheritance. > > I'm not sure I see an obvious benefit to making interfaces handled more > as a special case. Right now, the only place that really even knows > about interfaces is dynamic_cast and initialization. That seems like a > good thing to me. That wouldn't really be a special case, not any more than initializing a device's child in-place within the parent struct. Anyhow, nothing that can't be done as a followup. Will review v2 now. Paolo