qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 4/5] rust: vmstate: use const_refs_to_static


From: Zhao Liu
Subject: Re: [PATCH 4/5] rust: vmstate: use const_refs_to_static
Date: Wed, 7 May 2025 15:59:50 +0800

> @@ -998,7 +1000,7 @@ impl ObjectImpl for HPETState {
>              vmstate_of!(HPETState, counter),
>              vmstate_of!(HPETState, num_timers_save).with_version_id(2),
>              vmstate_validate!(HPETState, VALIDATE_TIMERS_NAME, 
> HPETState::validate_num_timers),
> -            vmstate_struct!(HPETState, timers[0 .. num_timers], 
> &VMSTATE_HPET_TIMER, BqlRefCell<HPETTimer>, 
> HPETState::validate_num_timers).with_version_id(0),
> +            vmstate_of!(HPETState, timers[0 .. num_timers], 
> HPETState::validate_num_timers).with_version_id(0),
>          })

The unified vmstate_of is indeed clean... it's more concise and easier
to use than the C version.




reply via email to

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