Re: [PATCH 10/12] rust: irq: define ObjectType for IRQState

2025-02-10 Thread Zhao Liu
> +unsafe impl ObjectType for IRQState { > +type Class = ObjectClass; > +const TYPE_NAME: &'static CStr = > +unsafe { CStr::from_bytes_with_nul_unchecked(bindings::TYPE_IRQ) }; > +} > +qom_isa!(IRQState: Object); This is necessary for Owned<>, though IRQState has been defined in C.

[PATCH 10/12] rust: irq: define ObjectType for IRQState

2025-02-07 Thread Paolo Bonzini
This is a small preparation in order to use an Owned for the argument to sysbus_connect_irq. Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/irq.rs | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/rust/qemu-api/src/irq.rs b/rust/qemu-api/src/irq.rs index 63