Merge branch 'fix-types' into 'master'

Fix build on ARM

See merge request ndarilek/speech-dispatcher-rs!1
This commit is contained in:
Nolan Darilek 2021-12-02 15:09:21 +00:00
commit 3b025dc0f9

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)
} }