mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
rust: remove offset_of replacement
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
5df3fe062f
commit
b134a09ffa
15 changed files with 16 additions and 239 deletions
|
@ -33,7 +33,7 @@ const FOO_ARRAY_MAX: usize = 3;
|
|||
// - VMSTATE_VARRAY_UINT16_UNSAFE
|
||||
// - VMSTATE_VARRAY_MULTIPLY
|
||||
#[repr(C)]
|
||||
#[derive(Default, qemu_api_macros::offsets)]
|
||||
#[derive(Default)]
|
||||
struct FooA {
|
||||
arr: [u8; FOO_ARRAY_MAX],
|
||||
num: u16,
|
||||
|
@ -154,7 +154,7 @@ fn test_vmstate_varray_multiply() {
|
|||
// - VMSTATE_ARRAY
|
||||
// - VMSTATE_STRUCT_VARRAY_UINT8 with BqlCell wrapper & test_fn
|
||||
#[repr(C)]
|
||||
#[derive(Default, qemu_api_macros::offsets)]
|
||||
#[derive(Default)]
|
||||
struct FooB {
|
||||
arr_a: [FooA; FOO_ARRAY_MAX],
|
||||
num_a: u8,
|
||||
|
@ -329,7 +329,6 @@ struct FooCWrapper([Opaque<*mut u8>; FOO_ARRAY_MAX]); // Though Opaque<> array i
|
|||
impl_vmstate_forward!(FooCWrapper);
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(qemu_api_macros::offsets)]
|
||||
struct FooC {
|
||||
ptr: *const i32,
|
||||
ptr_a: NonNull<FooA>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue