Il lun 21 ott 2024, 12:19 Junjie Mao <junjie....@hotmail.com> ha scritto:

>
> Paolo Bonzini <pbonz...@redhat.com> writes:
>
> > Registering the object is now done by the #[derive(Object)] macro.
>
> The module_init! macro is still necessary when a device needs more logic
> (in addition to a single type registration) in module init. That is not
> rare among the devices in C we have today.
>
> Manos and I had a conversation on this. He mentioned that he had a
> second Rust device that needs this macro [1].
>

Ok, I will change derive(Object) to use module_init! instead. What matters
is that module_init! is also fixed to not use the .ctors section.

Paolo


> [1] https://lore.kernel.org/qemu-devel/itblf.by425lac...@linaro.org/
>
> --
> Best Regards
> Junjie Mao
>
> >
> > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
> > ---
> >  rust/qemu-api/src/definitions.rs | 43 --------------------------------
> >  1 file changed, 43 deletions(-)
>
>

Reply via email to