diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2024-10-25 08:23:53 +0200 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-11-05 14:18:16 +0100 |
| commit | 718e255f0a97cf43939ae2e90ba4673ae9a8bd2f (patch) | |
| tree | ab5d09e3b4cb9cae3e44fed6a8f77458f354c6c5 /rust/qemu-api/src/vmstate.rs | |
| parent | 9f7d4520d679364f7ca95b7ddb899ff084e7d7c6 (diff) | |
| download | focaccia-qemu-718e255f0a97cf43939ae2e90ba4673ae9a8bd2f.tar.gz focaccia-qemu-718e255f0a97cf43939ae2e90ba4673ae9a8bd2f.zip | |
rust: introduce a c_str macro
This allows CStr constants to be defined easily on Rust 1.63.0, while checking that there are no embedded NULs. c"" literals were only stabilized in Rust 1.77.0. Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/src/vmstate.rs')
| -rw-r--r-- | rust/qemu-api/src/vmstate.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/qemu-api/src/vmstate.rs b/rust/qemu-api/src/vmstate.rs index 4e06e40505..9c252ce18e 100644 --- a/rust/qemu-api/src/vmstate.rs +++ b/rust/qemu-api/src/vmstate.rs @@ -15,7 +15,7 @@ macro_rules! vmstate_unused_buffer { ($field_exists_fn:expr, $version_id:expr, $size:expr) => {{ $crate::bindings::VMStateField { - name: c"unused".as_ptr(), + name: c_str!("unused").as_ptr(), err_hint: ::core::ptr::null(), offset: 0, size: $size, |