18 lines
443 B
Rust
18 lines
443 B
Rust
#[allow(unused_macros)]
|
|
macro_rules! cstr {
|
|
($s:expr) => {
|
|
concat!($s, "\0") as *const str as *const [::std::os::raw::c_char]
|
|
as *const ::std::os::raw::c_char
|
|
};
|
|
}
|
|
|
|
macro_rules! opaque {
|
|
($($vis:vis type $name:ident;)*) => {$(
|
|
#[repr(C)]
|
|
$vis struct $name {
|
|
_data: [u8; 0],
|
|
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
|
|
}
|
|
)*};
|
|
}
|