From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sf64u-0002xt-IU for qemu-devel@nongnu.org; Thu, 14 Jun 2012 05:11:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sf64p-0000u1-R5 for qemu-devel@nongnu.org; Thu, 14 Jun 2012 05:10:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sf64p-0000tf-CM for qemu-devel@nongnu.org; Thu, 14 Jun 2012 05:10:51 -0400 Message-ID: <4FD9AA96.9010507@redhat.com> Date: Thu, 14 Jun 2012 11:10:46 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1339620902-4481-1-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1339620902-4481-1-git-send-email-aliguori@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/3] qom: refactor Interfaces List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: "Peter A. G. Crosthwaite" , Andreas Faerber , qemu-devel@nongnu.org Il 13/06/2012 22:54, Anthony Liguori ha scritto: > The interface implementation was pretty busted. The way it created Objects for > each interface was extremely clumbsy and brittle. > > This is a new implementation that does something quite a bit more natural. It > simply modifies classes such that they can affectively have more than one super > class. > > Interfaces never get instantiated. Instead an object's class just refers to its > parent class and it's implemented interfaces. > > This should solve the issues Peter's run into and also eliminate the recursive > call to object_new() (its no longer necessary to allocate anything when creating > an object). > > This also comes with a test case for object. > I gave it only a quick look, but the approach is much more sane. Acked-by: Paolo Bonzini Paolo