use cty::{c_char, c_double, c_float, c_void};
pub type NSTDAny = *mut c_void;
pub type NSTDAnyConst = *const c_void;
pub type NSTDUSize = usize;
pub type NSTDISize = isize;
pub type NSTDUInt8 = u8;
pub type NSTDInt8 = i8;
pub type NSTDUInt16 = u16;
pub type NSTDInt16 = i16;
pub type NSTDUInt32 = u32;
pub type NSTDInt32 = i32;
pub type NSTDUInt64 = u64;
pub type NSTDInt64 = i64;
pub type NSTDFloat32 = c_float;
pub type NSTDFloat64 = c_double;
pub type NSTDChar = c_char;
pub type NSTDChar8 = u8;
pub type NSTDChar16 = u16;
pub type NSTDChar32 = u32;
pub type NSTDUnichar = NSTDChar32;
pub type NSTDByte = NSTDUInt8;
#[repr(C)]
#[allow(non_camel_case_types)]
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub enum NSTDBool {
NSTD_BOOL_FALSE,
NSTD_BOOL_TRUE,
}
impl Default for NSTDBool {
#[inline]
fn default() -> Self {
Self::NSTD_BOOL_FALSE
}
}
impl From<bool> for NSTDBool {
#[inline]
fn from(b: bool) -> Self {
match b {
false => Self::NSTD_BOOL_FALSE,
true => Self::NSTD_BOOL_TRUE,
}
}
}
impl Into<bool> for NSTDBool {
#[inline]
fn into(self) -> bool {
self == Self::NSTD_BOOL_TRUE
}
}