Debian Codegraph @

debian/rust-vendor/libc/src/primitives.rs

raw
1 //! This module contains type aliases for C's platform-specific types
2 //! and fixed-width integer types.
3 //!
4 //! The platform-specific types definitions were taken from rust-lang/rust in
5 //! library/core/src/ffi/primitives.rs
6 //!
7 //! The fixed-width integer aliases are deprecated: use the Rust types instead.
8
9 // FIXME(1.0): Deprecate these aliases in a few releases, remove in 1.0.
10 pub use core::ffi::{
11 c_char,
12 c_double,
13 c_float,
14 c_int,
15 c_long,
16 c_longlong,
17 c_schar,
18 c_short,
19 c_uchar,
20 c_uint,
21 c_ulong,
22 c_ulonglong,
23 c_ushort,
24 };
25
26 #[deprecated(since = "0.2.55", note = "Use i8 instead.")]
27 pub type int8_t = i8;
28 #[deprecated(since = "0.2.55", note = "Use i16 instead.")]
29 pub type int16_t = i16;
30 #[deprecated(since = "0.2.55", note = "Use i32 instead.")]
31 pub type int32_t = i32;
32 #[deprecated(since = "0.2.55", note = "Use i64 instead.")]
33 pub type int64_t = i64;
34 #[deprecated(since = "0.2.55", note = "Use u8 instead.")]
35 pub type uint8_t = u8;
36 #[deprecated(since = "0.2.55", note = "Use u16 instead.")]
37 pub type uint16_t = u16;
38 #[deprecated(since = "0.2.55", note = "Use u32 instead.")]
39 pub type uint32_t = u32;
40 #[deprecated(since = "0.2.55", note = "Use u64 instead.")]
41 pub type uint64_t = u64;
42
43 cfg_if! {
44 if #[cfg(all(target_arch = "aarch64", not(target_os = "windows")))] {
45 /// C `__int128` (a GCC extension that's part of many ABIs)
46 #[deprecated(since = "0.2.184", note = "Use i128 instead.")]
47 pub type __int128 = i128;
48 /// C `unsigned __int128` (a GCC extension that's part of many ABIs)
49 #[deprecated(since = "0.2.184", note = "Use u128 instead.")]
50 pub type __uint128 = u128;
51 /// C __int128_t (alternate name for [__int128][])
52 #[deprecated(since = "0.2.184", note = "Use i128 instead.")]
53 pub type __int128_t = i128;
54 /// C __uint128_t (alternate name for [__uint128][])
55 #[deprecated(since = "0.2.184", note = "Use u128 instead.")]
56 pub type __uint128_t = u128;
57 }
58 }