-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reworded to avoid fuzziness, mention ! in c_void docs.
- Loading branch information
1 parent
853fa58
commit 2cab068
Showing
14 changed files
with
23 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
Equivalent to C's `double` type. | ||
|
||
This type will almost always be [`f64`], however, the standard technically only guarantees that it be a floating-point number with at least the precision of a [`float`]. | ||
This type will almost always be [`f64`], which is guaranteed to be an [IEEE-754 double-precision float] in Rust. That said, the standard technically only guarantees that it be a floating-point number with at least the precision of a [`float`], and it may be `f32` or something entirely different from the IEEE-754 standard. | ||
|
||
[IEEE-754 double-precision float]: https://en.wikipedia.org/wiki/IEEE_754 | ||
[`float`]: type.c_float.html | ||
[`f64`]: ../../primitive.f64.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
Equivalent to C's `float` type. | ||
|
||
This type will almost always be [`f32`], however, the standard technically only guarantees that it be a floating-point number. | ||
This type will almost always be [`f32`], which is guaranteed to be an [IEEE-754 single-precision float] in Rust. That said, the standard technically only guarantees that it be a floating-point number, and it may have less precision than `f32` or not follow the IEEE-754 standard at all. | ||
|
||
[IEEE-754 single-precision float]: https://en.wikipedia.org/wiki/IEEE_754 | ||
[`f32`]: ../../primitive.f32.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
Equivalent to C's `signed int` (`int`) type. | ||
|
||
This type will almost always be [`i32`], however, the standard technically only requires that it be at least the size of a [`short`]. | ||
This type will almost always be [`i32`], but may differ on some esoteric systems. The C standard technically only requires that this type be a signed integer that is at least the size of a [`short`]; some systems define it as an [`i16`], for example. | ||
|
||
[`short`]: type.c_short.html | ||
[`i32`]: ../../primitive.i32.html | ||
[`i16`]: ../../primitive.i16.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
Equivalent to C's `signed long long` (`long long`) type. | ||
|
||
This type will almost always be [`i64`], however, the standard technically only requires that it be at least 64 bits, or at least the size of an [`long`]. | ||
This type will almost always be [`i64`], but may differ on some systems. The C standard technically only requires that this type be a signed integer that is at least 64 bits and at least the size of a [`long`], although in practice, no system would have a `long long` that is not an `i64`, as most systems do not have a standardised [`i128`] type. | ||
|
||
[`long`]: type.c_int.html | ||
[`i64`]: ../../primitive.i64.html | ||
[`i128`]: ../../primitive.i128.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Equivalent to C's `signed char` type. | ||
|
||
This type will almost always be [`i8`], but its size is technically equal to the size of a C [`char`], which isn't very clear-cut. | ||
This type will always be [`i8`], but is included for completeness. It is defined as being a signed integer the same size as a C [`char`]. | ||
|
||
[`char`]: type.c_char.html | ||
[`i8`]: ../../primitive.i8.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Equivalent to C's `signed short` (`short`) type. | ||
|
||
This type will almost always be [`i16`], however, the standard technically only requires that it be at least 16 bits, or at least the size of a C [`char`]. | ||
This type will almost always be [`i16`], but may differ on some esoteric systems. The C standard technically only requires that this type be a signed integer with at least 16 bits; some systems may define it as `i32`, for example. | ||
|
||
[`char`]: type.c_char.html | ||
[`i16`]: ../../primitive.i16.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Equivalent to C's `unsigned char` type. | ||
|
||
This type will almost always be [`u8`], but its size is technically equal to the size of a C [`char`], which isn't very clear-cut. | ||
This type will always be [`u8`], but is included for completeness. It is defined as being an unsigned integer the same size as a C [`char`]. | ||
|
||
[`char`]: type.c_char.html | ||
[`u8`]: ../../primitive.u8.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
Equivalent to C's `unsigned int` type. | ||
|
||
This type will almost always be [`u32`], however, the standard technically on requires that it be the same size as an [`int`], which isn't very clear-cut. | ||
This type will almost always be [`u16`], but may differ on some esoteric systems. The C standard technically only requires that this type be an unsigned integer with the same size as an [`int`]; some systems define it as a [`u16`], for example. | ||
|
||
[`int`]: type.c_int.html | ||
[`u32`]: ../../primitive.u32.html | ||
[`u16`]: ../../primitive.u16.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
Equivalent to C's `unsigned long long` type. | ||
|
||
This type will almost always be [`u64`], however, the standard technically only requires that it be the same size as a [`long long`], which isn't very clear-cut. | ||
This type will almost always be [`u64`], but may differ on some systems. The C standard technically only requires that this type be an unsigned integer with the size of a [`long long`], although in practice, no system would have a `long long` that is not a `u64`, as most systems do not have a standardised [`u128`] type. | ||
|
||
[`long long`]: type.c_longlong.html | ||
[`u64`]: ../../primitive.u64.html | ||
[`u128`]: ../../primitive.u128.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Equivalent to C's `unsigned short` type. | ||
|
||
This type will almost always be [`u16`], however, the standard technically only requires that it be the same size as a [`short`], which isn't very clear-cut. | ||
This type will almost always be [`u16`], but may differ on some esoteric systems. The C standard technically only requires that this type be an unsigned integer with the same size as a [`short`]. | ||
|
||
[`short`]: type.c_short.html | ||
[`u16`]: ../../primitive.u16.html |