Avoid an explicit cast from *const c_uchar to *const c_char
As noted in the `ffi` module docs, passing pointer/length byte strings from Rust to C++ is easier if we declare them as `*const c_uchar` on the Rust side, but `const char *` (possibly signed) on the C++ side. This is allowed because both pointer types are ABI-compatible, regardless of char signedness.
This commit is contained in:
@@ -2438,7 +2438,7 @@ unsafe extern "C" {
|
||||
OutputObjFile: *const c_char,
|
||||
DebugInfoCompression: *const c_char,
|
||||
UseEmulatedTls: bool,
|
||||
ArgsCstrBuff: *const c_char,
|
||||
ArgsCstrBuff: *const c_uchar, // See "PTR_LEN_STR".
|
||||
ArgsCstrBuffLen: usize,
|
||||
UseWasmEH: bool,
|
||||
) -> *mut TargetMachine;
|
||||
|
||||
Reference in New Issue
Block a user