x11: fix build on arm

The c_char type, which was used under the hood is different depending
on arch, thus use it directly instead of i8.

Fixes #3735.
This commit is contained in:
Kirill Chibisov
2024-06-17 13:51:08 +03:00
parent 79aa95b212
commit c73d8cff20
2 changed files with 5 additions and 1 deletions

View File

@@ -39,3 +39,7 @@ The migration guide could reference other migration examples in the current
changelog entry. changelog entry.
## Unreleased ## Unreleased
### Fixed
- On X11, build on arm platforms.

View File

@@ -158,7 +158,7 @@ struct PreeditCallbacks {
impl PreeditCallbacks { impl PreeditCallbacks {
pub fn new(client_data: ffi::XPointer) -> PreeditCallbacks { pub fn new(client_data: ffi::XPointer) -> PreeditCallbacks {
let start_callback = create_xim_callback(client_data, unsafe { let start_callback = create_xim_callback(client_data, unsafe {
mem::transmute::<usize, unsafe extern "C" fn(ffi::XIM, *mut i8, *mut i8)>( mem::transmute::<usize, unsafe extern "C" fn(ffi::XIM, ffi::XPointer, ffi::XPointer)>(
preedit_start_callback as usize, preedit_start_callback as usize,
) )
}); });