mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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>
This commit is contained in:
parent
9f7d4520d6
commit
718e255f0a
8 changed files with 78 additions and 19 deletions
|
@ -3,6 +3,7 @@ _qemu_api_rs = static_library(
|
|||
structured_sources(
|
||||
[
|
||||
'src/lib.rs',
|
||||
'src/c_str.rs',
|
||||
'src/definitions.rs',
|
||||
'src/device_class.rs',
|
||||
'src/vmstate.rs',
|
||||
|
@ -18,6 +19,9 @@ _qemu_api_rs = static_library(
|
|||
],
|
||||
)
|
||||
|
||||
rust.test('rust-qemu-api-tests', _qemu_api_rs,
|
||||
suite: ['unit', 'rust'])
|
||||
|
||||
qemu_api = declare_dependency(
|
||||
link_with: _qemu_api_rs,
|
||||
dependencies: qemu_api_macros,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue