From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzlJg-0006Y4-Jg for qemu-devel@nongnu.org; Fri, 10 Aug 2012 05:15:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzlJe-00039q-9S for qemu-devel@nongnu.org; Fri, 10 Aug 2012 05:15:36 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55393 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzlJd-00039a-W1 for qemu-devel@nongnu.org; Fri, 10 Aug 2012 05:15:34 -0400 Message-ID: <5024D131.5090702@suse.de> Date: Fri, 10 Aug 2012 11:15:29 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1344568571-11755-1-git-send-email-peter.crosthwaite@petalogix.com> <1344568571-11755-2-git-send-email-peter.crosthwaite@petalogix.com> In-Reply-To: <1344568571-11755-2-git-send-email-peter.crosthwaite@petalogix.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/2] qom: Reimplement Interfaces List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: "Peter A. G. Crosthwaite" , pbonzini@redhat.com, aliguori@us.ibm.com, qemu-devel@nongnu.org, edgar.iglesias@gmail.com Am 10.08.2012 05:16, schrieb Peter A. G. Crosthwaite: > From: Anthony Liguori >=20 > The current implementation of Interfaces is poorly designed. Each inte= rface > that an object implements ends up being an object that's tracked by the > implementing object. There's all sorts of gymnastics to deal with cast= ing > between these objects. >=20 > But an interface shouldn't be associated with an Object. Interfaces ar= e global > to a class. This patch moves all Interface knowledge to ObjectClass el= iminating > the relationship between Object and Interfaces. >=20 > Interfaces are now abstract (as they should be) but this is okay. Inte= rfaces > essentially act as additional parents for the classes and are treated a= s such. >=20 > With this new implementation, we should fully support derived interface= s > including reimplementing an inherited interface. >=20 > PC: Rebased against qom-next merge Jun-2012. >=20 > PC: Removed replication of cast logic for interfaces, i.e. there is onl= y > one cast function - object_dynamic_cast() (and object_dynamic_cast_asse= rt()) >=20 > Signed-off-by: Anthony Liguori > Signed-off-by: Peter A. G. Crosthwaite > Acked-by: Paolo Bonzini Anthony, didn't you have a whole series to refactor interfaces and add test cases? /-F --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg