about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThom Chiovoloni <chiovolonit@gmail.com>2021-08-25 11:25:26 -0700
committerThom Chiovoloni <chiovolonit@gmail.com>2021-08-25 11:25:26 -0700
commit33c71ac87d4c4bad82dfd646d7a9254c6b358a26 (patch)
tree7d02cb8d2fe689c63bcf78092c12e3bedd029d71
parenta992a11913b39a258158646bb1e03528c5aa5060 (diff)
downloadrust-33c71ac87d4c4bad82dfd646d7a9254c6b358a26.tar.gz
rust-33c71ac87d4c4bad82dfd646d7a9254c6b358a26.zip
Add `c_size_t` and `c_ssize_t` to `std::os::raw`.
-rw-r--r--library/std/src/os/raw/mod.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/library/std/src/os/raw/mod.rs b/library/std/src/os/raw/mod.rs
index 50464a050c7..7ce58fb1d0f 100644
--- a/library/std/src/os/raw/mod.rs
+++ b/library/std/src/os/raw/mod.rs
@@ -151,3 +151,17 @@ type_alias_no_nz! { "double.md", c_double = f64; }
 #[stable(feature = "raw_os", since = "1.1.0")]
 #[doc(no_inline)]
 pub use core::ffi::c_void;
+
+/// Equivalent to C's `size_t` type, from `stddef.h` (or `cstddef` for C++).
+///
+/// This type is currently always [`usize`], however in the future there may be
+/// platforms where this is not the case.
+#[unstable(feature = "c_size_t", issue = "none")]
+pub type c_size_t = usize;
+
+/// Equivalent to C's `ssize_t` type, from `stddef.h` (or `cstddef` for C++).
+///
+/// This type is currently always [`isize`], however in the future there may be
+/// platforms where this is not the case.
+#[unstable(feature = "c_size_t", issue = "none")]
+pub type c_ssize_t = isize;