Skip to content

Commit 853fa58

Browse files
author
Clar Charr
committed
Revisions suggested in comments
1 parent 1a04353 commit 853fa58

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

src/libstd/os/raw/char.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Equivalent to C's `char` type.
22

33
[C's `char` type] is completely unlike [Rust's `char` type]; while Rust's type represents a unicode scalar value, C's `char` type is just an ordinary integer. In practice, this type will always be either [`i8`] or [`u8`], but you're technically not supposed to rely on this behaviour, as the standard only defines a char as being at least eight bits long.
44

5-
C chars are most commonly used to make C strings. Unlike Rust, where the length of a string is included alongside the string, C strings mark the end of a string with a zero. See [`CStr`] for more information.
5+
C chars are most commonly used to make C strings. Unlike Rust, where the length of a string is included alongside the string, C strings mark the end of a string with the character `'\0'`. See [`CStr`] for more information.
66

77
[C's `char` type]: https://en.wikipedia.org/wiki/C_data_types#Basic_types
88
[Rust's `char` type]: ../../primitive.char.html

src/libstd/os/raw/long.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
Equivalent to C's `signed long` (`long`) type.
22

3-
This type will usually be [`i64`], but is sometimes [`i32`] \(i.e. [`isize`]\) on 32-bit systems. Technically, the standard only requires that it be at least 32 bits, or at least the size of an [`int`].
3+
This type will usually be [`i64`], but is sometimes [`i32`]. Technically, the standard only requires that it be at least 32 bits, or at least the size of an [`int`].
44

55
[`int`]: type.c_int.html
66
[`i32`]: ../../primitive.i32.html
77
[`i64`]: ../../primitive.i64.html
8-
[`isize`]: ../../primitive.isize.html

src/libstd/os/raw/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ use fmt;
8383
/// and `*mut c_void` is equivalent to C's `void*`. That said, this is
8484
/// *not* the same as C's `void` return type, which is Rust's `()` type.
8585
///
86-
/// [pointer]: ../primitive.pointer.html
86+
/// [pointer]: ../../primitive.pointer.html
8787
// NB: For LLVM to recognize the void pointer type and by extension
8888
// functions like malloc(), we need to have it represented as i8* in
8989
// LLVM bitcode. The enum used here ensures this and prevents misuse

src/libstd/os/raw/ulong.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
Equivalent to C's `unsigned long` type.
22

3-
This type will usually be [`u64`], but is sometimes [`u32`] \(i.e. [`usize`]\) on 32-bit systems. Technically, the standard only requires that it be the same size as a [`long`], which isn't very clear-cut.
3+
This type will usually be [`u64`], but is sometimes [`u32`]. Technically, the standard only requires that it be the same size as a [`long`], which isn't very clear-cut.
44

55
[`long`]: type.c_long.html
66
[`u32`]: ../../primitive.u32.html
77
[`u64`]: ../../primitive.u64.html
8-
[`usize`]: ../../primitive.usize.html

0 commit comments

Comments
 (0)