On Fri, Aug 10, 2012 at 7:15 PM, Andreas Färber <afaer...@suse.de> wrote: > Am 10.08.2012 05:16, schrieb Peter A. G. Crosthwaite: >> From: Anthony Liguori <aligu...@us.ibm.com> >> >> The current implementation of Interfaces is poorly designed. Each interface >> 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 casting >> between these objects. >> >> But an interface shouldn't be associated with an Object. Interfaces are >> global >> to a class. This patch moves all Interface knowledge to ObjectClass >> eliminating >> the relationship between Object and Interfaces. >> >> Interfaces are now abstract (as they should be) but this is okay. Interfaces >> essentially act as additional parents for the classes and are treated as >> such. >> >> With this new implementation, we should fully support derived interfaces >> including reimplementing an inherited interface. >> >> PC: Rebased against qom-next merge Jun-2012. >> >> PC: Removed replication of cast logic for interfaces, i.e. there is only >> one cast function - object_dynamic_cast() (and object_dynamic_cast_assert()) >> >> Signed-off-by: Anthony Liguori <aligu...@us.ibm.com> >> Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwa...@petalogix.com> >> Acked-by: Paolo Bonzini <pbonz...@redhat.com> > > Anthony, didn't you have a whole series to refactor interfaces and add > test cases? >
This is patch 1 from that series. I have refactored it a little (as indicated in the comments). Unless theres been another series since I missed? > /-F > > -- > SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany > GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg