mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-03 18:29:09 +00:00
Prospective build fix for arm cross build
Use the `c_char` type that adapts to the signedness
This commit is contained in:
parent
71199fbb16
commit
000d95670b
1 changed files with 7 additions and 6 deletions
|
@ -18,7 +18,7 @@ pub fn find_families(requested_family: &str) -> Vec<String> {
|
|||
feature = "fontconfig-dlopen",
|
||||
LIB,
|
||||
FcNameParse,
|
||||
family_cstr.as_ptr() as *mut u8
|
||||
family_cstr.as_ptr() as *mut core::ffi::c_char
|
||||
);
|
||||
ffi_dispatch!(
|
||||
feature = "fontconfig-dlopen",
|
||||
|
@ -49,7 +49,7 @@ pub fn find_families(requested_family: &str) -> Vec<String> {
|
|||
LIB,
|
||||
FcPatternGetString,
|
||||
*(*result_set).fonts.offset(idx as isize),
|
||||
b"family\0".as_ptr() as *const i8,
|
||||
b"family\0".as_ptr() as *const core::ffi::c_char,
|
||||
0,
|
||||
&mut raw_family_name
|
||||
) != ffi::FcResultMatch
|
||||
|
@ -60,10 +60,11 @@ pub fn find_families(requested_family: &str) -> Vec<String> {
|
|||
if raw_family_name.is_null() {
|
||||
continue;
|
||||
}
|
||||
if let Some(family_name) = std::ffi::CStr::from_ptr(raw_family_name as *const i8)
|
||||
.to_str()
|
||||
.ok()
|
||||
.map(|raw_family_name| raw_family_name.to_owned())
|
||||
if let Some(family_name) =
|
||||
std::ffi::CStr::from_ptr(raw_family_name as *const core::ffi::c_char)
|
||||
.to_str()
|
||||
.ok()
|
||||
.map(|raw_family_name| raw_family_name.to_owned())
|
||||
{
|
||||
families.push(family_name)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue