Fix build on ARM

Differences in signedness were preventing builds.
This commit is contained in:
Malloc Voidstar 2021-12-02 05:34:32 -08:00
parent ac12fb132e
commit 67a8c19410
No known key found for this signature in database
GPG Key ID: C34BA7CBAF747755

View File

@ -5,6 +5,7 @@ use std::{
ffi::{CStr, CString}, ffi::{CStr, CString},
fmt, fmt,
marker::Send, marker::Send,
os::raw::c_char,
sync::Mutex, sync::Mutex,
}; };
@ -130,7 +131,7 @@ unsafe extern "C" fn cb(msg_id: u64, client_id: u64, state: u32) {
} }
} }
unsafe extern "C" fn cb_im(msg_id: u64, client_id: u64, state: u32, index_mark: *mut i8) { unsafe extern "C" fn cb_im(msg_id: u64, client_id: u64, state: u32, index_mark: *mut c_char) {
let index_mark = CStr::from_ptr(index_mark); let index_mark = CStr::from_ptr(index_mark);
let index_mark = index_mark.to_string_lossy().to_string(); let index_mark = index_mark.to_string_lossy().to_string();
let state = match state { let state = match state {
@ -353,7 +354,7 @@ impl Connection {
} }
pub fn wchar(&self, priority: Priority, wchar: i32) -> bool { pub fn wchar(&self, priority: Priority, wchar: i32) -> bool {
let v = unsafe { spd_wchar(self.0, priority as u32, wchar) }; let v = unsafe { spd_wchar(self.0, priority as u32, wchar as wchar_t) };
i32_to_bool(v) i32_to_bool(v)
} }