qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 09/12] rust: qdev: expose inherited methods to subclasses of


From: Zhao Liu
Subject: Re: [PATCH 09/12] rust: qdev: expose inherited methods to subclasses of SysBusDevice
Date: Thu, 26 Dec 2024 12:47:21 +0800

On Fri, Dec 20, 2024 at 03:29:51PM +0100, Paolo Bonzini wrote:
> Date: Fri, 20 Dec 2024 15:29:51 +0100
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: [PATCH 09/12] rust: qdev: expose inherited methods to subclasses
>  of SysBusDevice
> X-Mailer: git-send-email 2.47.1
> 
> The ObjectDeref trait now provides all the magic that is required to fake
> inheritance.  Replace the "impl SysBusDevice" block of qemu_api::sysbus
> with a trait, so that sysbus_init_irq() can be invoked as "self.init_irq()"
> without any intermediate upcast.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  rust/hw/char/pl011/src/device.rs |  6 ++----
>  rust/qemu-api/src/irq.rs         |  3 +--
>  rust/qemu-api/src/prelude.rs     |  2 ++
>  rust/qemu-api/src/sysbus.rs      | 17 +++++++++--------
>  4 files changed, 14 insertions(+), 14 deletions(-)

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]