[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] qom: Reimplement Interfaces
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] qom: Reimplement Interfaces |
Date: |
Fri, 10 Aug 2012 11:15:29 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 |
Am 10.08.2012 05:16, schrieb Peter A. G. Crosthwaite:
> From: Anthony Liguori <address@hidden>
>
> 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 <address@hidden>
> Signed-off-by: Peter A. G. Crosthwaite <address@hidden>
> Acked-by: Paolo Bonzini <address@hidden>
Anthony, didn't you have a whole series to refactor interfaces and add
test cases?
/-F
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- Re: [Qemu-devel] [PATCH 1/2] qom: Reimplement Interfaces, (continued)
- [Qemu-devel] [PATCH 2/2] xilinx_axi*: Re-implemented interconnect, Peter A. G. Crosthwaite, 2012/08/05
- [Qemu-devel] [PULL 0/2] QOMify AXI stream for Xilinx AXI ethernet/DMA, Peter A. G. Crosthwaite, 2012/08/09
- [Qemu-devel] [PULL 0/2] QOMify AXI stream for Xilinx AXI ethernet/DMA, Peter A. G. Crosthwaite, 2012/08/09
- [Qemu-devel] [PATCH 2/2] xilinx_axi*: Re-implemented interconnect, Peter A. G. Crosthwaite, 2012/08/09
- Re: [Qemu-devel] [PULL 0/2] QOMify AXI stream for Xilinx AXI ethernet/DMA, Edgar E. Iglesias, 2012/08/13