Merge branch 'fix-types' into 'master'

Fix build on ARM

See merge request ndarilek/speech-dispatcher-rs!1
This commit is contained in:
Malloc Voidstar 2021-12-02 13:39:05 +00:00
commit 5742dda37d
1 changed files with 3 additions and 2 deletions

View File

@ -5,6 +5,7 @@ use std::{
ffi::{CStr, CString},
fmt,
marker::Send,
os::raw::c_char,
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 = index_mark.to_string_lossy().to_string();
let state = match state {
@ -353,7 +354,7 @@ impl Connection {
}
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)
}