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 committed by GitHub
parent 34c15608e0
commit d8ffd4bb26
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -50,3 +50,7 @@ changelog entry.
- Remove `EventLoop::run`.
- Remove `EventLoopExtRunOnDemand::run_on_demand`.
- Remove `EventLoopExtPumpEvents::pump_events`.
### Fixed
- On X11, build on arm platforms.

View file

@ -158,7 +158,7 @@ struct PreeditCallbacks {
impl PreeditCallbacks {
pub fn new(client_data: ffi::XPointer) -> PreeditCallbacks {
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,
)
});