> > > +impl_vmstate_scalar!(vmstate_info_uint64, u64);
> >
> > What about applying this to "usize" with vmstate_info_uint64?
>
> There's 32-bit hosts too... So one would have to add vmstate_info_ulong
> which is serialized as 64-bit.
>
> We can add it later, but perhaps we could also create a
On 1/8/25 07:45, Zhao Liu wrote:
#[macro_export]
macro_rules! vmstate_of {
-($struct_name:ty, $field_name:ident $([0 .. $num:ident $(* $factor:expr)?])?
$(,)?) => {
+($struct_name:ty, $field_name:ident $([0 .. $num:tt $(* $factor:expr)?])?
$(,)?) => {
Why change ident to tt?
Reb
> #[macro_export]
> macro_rules! vmstate_of {
> -($struct_name:ty, $field_name:ident $([0 .. $num:ident $(*
> $factor:expr)?])? $(,)?) => {
> +($struct_name:ty, $field_name:ident $([0 .. $num:tt $(*
> $factor:expr)?])? $(,)?) => {
Why change ident to tt?
> $crate::bindings::
Scalar types are those that have their own VMStateInfo. This poses
a problem in that references to VMStateInfo can only be included in
associated consts starting with Rust 1.83.0, when the const_refs_static
was stabilized. Removing the requirement is done by placing a limited
list of VMStateInfos