1 //! Compatibility module for C platform-specific types. Use [`core::ffi`] instead. 2 3 #![stable(feature = "raw_os", since = "1.1.0")] 4 5 #[cfg(test)] 6 mod tests; 7 8 macro_rules! alias_core_ffi { 9 ($($t:ident)*) => {$( 10 #[stable(feature = "raw_os", since = "1.1.0")] 11 #[doc = include_str!(concat!("../../../../core/src/ffi/", stringify!($t), ".md"))] 12 // Make this type alias appear cfg-dependent so that Clippy does not suggest 13 // replacing expressions like `0 as c_char` with `0_i8`/`0_u8`. This #[cfg(all())] can be 14 // removed after the false positive in https://github.com/rust-lang/rust-clippy/issues/8093 15 // is fixed. 16 #[cfg(all())] 17 #[doc(cfg(all()))] 18 pub type $t = core::ffi::$t; 19 )*} 20 } 21 22 alias_core_ffi! { 23 c_char c_schar c_uchar 24 c_short c_ushort 25 c_int c_uint 26 c_long c_ulong 27 c_longlong c_ulonglong 28 c_float 29 c_double 30 c_void 31 } 32