diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-10-18 15:22:59 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-11-05 14:18:16 +0100 |
commit | c92c447ff04ca6a5b80da2930d87637b34713b8c (patch) | |
tree | 760f6f57abc546dac6f75246dc9e383c3d39993b /rust/qemu-api/meson.build | |
parent | 03a573b960dae735847e6b6877b5cc3d07466e94 (diff) | |
download | qemu-c92c447ff04ca6a5b80da2930d87637b34713b8c.zip qemu-c92c447ff04ca6a5b80da2930d87637b34713b8c.tar.gz qemu-c92c447ff04ca6a5b80da2930d87637b34713b8c.tar.bz2 |
rust: make properties array immutable
Now that device_class_set_props() takes a const pointer, the only part of
"define_property!" that needs to be non-const is the call to try_into().
This in turn will only break if offset_of returns a value with the most
significant bit set (i.e. a struct size that is >=2^31 or >= 2^63,
respectively on 32- and 64-bit system), which is impossible.
Just use a cast and clean everything up to remove the run-time
initialization. This also removes a use of OnceLock, which was only
stabilized in 1.70.0.
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/meson.build')
0 files changed, 0 insertions, 0 deletions