diff --git a/speech-dispatcher/src/lib.rs b/speech-dispatcher/src/lib.rs index 9050b9c..440abb5 100644 --- a/speech-dispatcher/src/lib.rs +++ b/speech-dispatcher/src/lib.rs @@ -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) }