mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-29 21:33:53 -06:00
rust: chardev: wrap Chardev with Opaque<>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
af0868cba3
commit
48627510a7
3 changed files with 7 additions and 5 deletions
|
@ -6,9 +6,13 @@
|
|||
|
||||
use std::ffi::CStr;
|
||||
|
||||
use crate::{bindings, prelude::*};
|
||||
use crate::{bindings, cell::Opaque, prelude::*};
|
||||
|
||||
/// A safe wrapper around [`bindings::Chardev`].
|
||||
#[repr(transparent)]
|
||||
#[derive(qemu_api_macros::Wrapper)]
|
||||
pub struct Chardev(Opaque<bindings::Chardev>);
|
||||
|
||||
pub type Chardev = bindings::Chardev;
|
||||
pub type ChardevClass = bindings::ChardevClass;
|
||||
|
||||
unsafe impl ObjectType for Chardev {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue