Adding the CString wrapping functionality.
This is currently just wrapping the rust standard library. This should later become our own implementation.
This commit is contained in:
parent
2d6bed361e
commit
d148130612
@ -67,3 +67,26 @@ pub enum CVoid
|
||||
#[doc(hidden)]
|
||||
_Variant2
|
||||
}
|
||||
|
||||
|
||||
|
||||
// String types.
|
||||
/*
|
||||
#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone)]
|
||||
pub struct CString
|
||||
{
|
||||
chars: Box<[u8]>
|
||||
}
|
||||
|
||||
#[derive(Hash)]
|
||||
pub struct CStr
|
||||
{
|
||||
inner: [CChar]
|
||||
}
|
||||
*/
|
||||
#[cfg(feature="use_std")]
|
||||
pub type CStr = ::std::ffi::CStr;
|
||||
#[cfg(feature="use_std")]
|
||||
pub type CString = ::std::ffi::CString;
|
||||
#[cfg(feature="use_std")]
|
||||
pub type NullByteError = ::std::ffi::NulError;
|
||||
|
@ -30,4 +30,6 @@ pub use self::c_types::{CChar, CUChar};
|
||||
pub use self::c_types::{CShort, CUShort, CInt, CUInt, CLong, CULong};
|
||||
pub use self::c_types::{CLongLong, CULongLong, CFloat, CDouble};
|
||||
pub use self::c_types::{CVoid, CReturnVoid};
|
||||
#[cfg(feature = "client")]
|
||||
pub use self::c_types::{CStr, CString, NullByteError};
|
||||
pub use self::raw::{AsRaw, AsRawMut, AsRawPtr, AsRawMutPtr, FromRaw, IntoRaw};
|
||||
|
Loading…
x
Reference in New Issue
Block a user