[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.
- [PATCH preview 0/5] rust: allow minimum version of 1.83, Paolo Bonzini, 2025/05/05
- [PATCH 1/5] meson, cargo: require Rust 1.83.0, Paolo Bonzini, 2025/05/05
- [PATCH 2/5] rust: use inline const expressions, Paolo Bonzini, 2025/05/05
- [PATCH 3/5] rust: vmstate: convert to use builder pattern, Paolo Bonzini, 2025/05/05
- [PATCH 4/5] rust: vmstate: use const_refs_to_static, Paolo Bonzini, 2025/05/05
- Re: [PATCH 4/5] rust: vmstate: use const_refs_to_static,
Zhao Liu <=
- [PATCH 5/5] rust: qdev: const_refs_to_static, Paolo Bonzini, 2025/05/05
- Re: [PATCH preview 0/5] rust: allow minimum version of 1.83, Zhao Liu, 2025/05/06
- Re: [PATCH preview 0/5] rust: allow minimum version of 1.83, Paolo Bonzini, 2025/05/06
- Re: [PATCH preview 0/5] rust: allow minimum version of 1.83, Zhao Liu, 2025/05/06
- Re: [PATCH preview 0/5] rust: allow minimum version of 1.83, Daniel P . Berrangé, 2025/05/06
- Re: [PATCH preview 0/5] rust: allow minimum version of 1.83, Daniel P . Berrangé, 2025/05/06
- Re: [PATCH preview 0/5] rust: allow minimum version of 1.83, Paolo Bonzini, 2025/05/06
- Re: [PATCH preview 0/5] rust: allow minimum version of 1.83, Daniel P . Berrangé, 2025/05/06
- Re: [PATCH preview 0/5] rust: allow minimum version of 1.83, Paolo Bonzini, 2025/05/06
- Re: [PATCH preview 0/5] rust: allow minimum version of 1.83, Zhao Liu, 2025/05/06