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

bugfix: Fix use of i8 instead of c_char causing build failures on Linux #45

Merged
merged 1 commit into from
Jan 6, 2023

Conversation

ConnorGray
Copy link
Collaborator

The code mistakenly assumed that c_char was i8 on all Rust platforms, but that is not true on Linux, so this is causing type mismatch errors at build time on Linux.

(This mistake of mine was presumably reinforced by Rust issue #15823, which is an issue with rustdoc rendering some type aliases in function signatures as the pointed-to type and not by the alias name, which--among other effects--causes CStr::from_raw() and CString::into_raw() to show i8 in their type signatures instead of c_char.)

See also: rust-lang/rust#15823

The code mistakenly assumed that c_char was i8 on all Rust platforms, but
that is not true on Linux, so this is causing type mismatch errors at build
time on Linux.

(This mistake of mine was presumably reinforced by Rust issue #15823, which is
an issue with rustdoc rendering some type aliases in function signatures as
the pointed-to type and not by the alias name, which--among other effects--causes
CStr::from_raw() and CString::into_raw() to show `i8` in their type signatures
instead of `c_char`.)

See also: rust-lang/rust#15823
@ConnorGray ConnorGray merged commit d6ace94 into master Jan 6, 2023
@ConnorGray ConnorGray deleted the bugfix/c_char-is-unsigned-on-linux branch January 6, 2023 22:55
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 this pull request may close these issues.

1 participant