mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2025-02-20 08:33:26 +00:00
Fix for when std::os::raw::c_char is u8 (armv7)
This commit is contained in:
parent
dd3af090b7
commit
d963bf97b7
@ -141,7 +141,7 @@ fn test_c_call_r() {
|
|||||||
}
|
}
|
||||||
let failure = unsafe { cxx_run_test() };
|
let failure = unsafe { cxx_run_test() };
|
||||||
if !failure.is_null() {
|
if !failure.is_null() {
|
||||||
let msg = unsafe { CStr::from_ptr(failure) };
|
let msg = unsafe { CStr::from_ptr(failure as *mut std::os::raw::c_char) };
|
||||||
eprintln!("{}", msg.to_string_lossy());
|
eprintln!("{}", msg.to_string_lossy());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user