Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate the fixed-width integer aliases #1304

Closed
gnzlbg opened this issue Mar 14, 2019 · 0 comments · Fixed by #1379
Closed

Deprecate the fixed-width integer aliases #1304

gnzlbg opened this issue Mar 14, 2019 · 0 comments · Fixed by #1379

Comments

@gnzlbg
Copy link
Contributor

gnzlbg commented Mar 14, 2019

We do guarantee that the fixed-width integer types {i,u}{8,16,32,64} are layout compatible with C's {u,}int{8,16,32,64}_t.

There is no need to provide type aliases (e.g. libc::uint64_t) for these, in the same way that we don't provide a libc::c_bool type alias for bool.


Note that c_float and c_double aren't necessarily layout compatible with f32 and f64.

@gnzlbg gnzlbg changed the title Deprecate the fixed-width integer and float aliases Deprecate the fixed-width integer aliases Mar 25, 2019
gnzlbg added a commit to gnzlbg/libc that referenced this issue May 29, 2019
bors added a commit that referenced this issue May 29, 2019
Deprecate fixed width integer type aliases

cc @emilio - I think it makes sense to ensure that the latest released version of bindgen works properly with this change. That is, that even when asked to use C types from, e.g., `libc::`, it does not use aliases for the fixed-width integer C types (e.g. `libc::int64_t`) but uses Rust primitive types instead (e.g. `u64`).

Closes #1304 .
AzureMarker added a commit to pi-hole/api that referenced this issue Jun 6, 2019
As of rust-lang/libc#1304 types such as
`libc::int64_t` are deprecated. Instead, we should use the native Rust
types like `i64`, as they are compatible with the C types.

Signed-off-by: Mcat12 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant