mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
fix: compiles on android 32bit
This commit is contained in:
@@ -132,7 +132,7 @@ pub unsafe extern "C" fn dc_reset_tables(
|
||||
b"(8) Rest but server config reset.\x00" as *const u8 as *const libc::c_char,
|
||||
);
|
||||
}
|
||||
(*context).cb.expect("non-null function pointer")(
|
||||
((*context).cb)(
|
||||
context,
|
||||
Event::MSGS_CHANGED,
|
||||
0i32 as uintptr_t,
|
||||
@@ -380,7 +380,7 @@ unsafe extern "C" fn poke_spec(
|
||||
real_spec,
|
||||
);
|
||||
if read_cnt > 0i32 {
|
||||
(*context).cb.expect("non-null function pointer")(
|
||||
((*context).cb)(
|
||||
context,
|
||||
Event::MSGS_CHANGED,
|
||||
0i32 as uintptr_t,
|
||||
@@ -1749,12 +1749,8 @@ pub unsafe extern "C" fn dc_cmdline(
|
||||
} else if strcmp(cmd, b"event\x00" as *const u8 as *const libc::c_char) == 0i32 {
|
||||
if !arg1.is_null() {
|
||||
let mut event = Event::from_u32(atoi(arg1) as u32).unwrap();
|
||||
let mut r: uintptr_t = (*context).cb.expect("non-null function pointer")(
|
||||
context,
|
||||
event,
|
||||
0i32 as uintptr_t,
|
||||
0i32 as uintptr_t,
|
||||
);
|
||||
let mut r: uintptr_t =
|
||||
((*context).cb)(context, event, 0i32 as uintptr_t, 0i32 as uintptr_t);
|
||||
ret = dc_mprintf(
|
||||
b"Sending event %i, received value %i.\x00" as *const u8 as *const libc::c_char,
|
||||
event as libc::c_int,
|
||||
|
||||
@@ -77,7 +77,7 @@ use self::stress::*;
|
||||
******************************************************************************/
|
||||
static mut s_do_log_info: libc::c_int = 1i32;
|
||||
|
||||
unsafe fn receive_event(
|
||||
unsafe extern "C" fn receive_event(
|
||||
mut context: *mut dc_context_t,
|
||||
mut event: Event,
|
||||
mut data1: uintptr_t,
|
||||
@@ -396,7 +396,7 @@ unsafe extern "C" fn read_cmd() -> *mut libc::c_char {
|
||||
unsafe fn main_0(mut argc: libc::c_int, mut argv: *mut *mut libc::c_char) -> libc::c_int {
|
||||
let mut cmd: *mut libc::c_char = 0 as *mut libc::c_char;
|
||||
let mut context: *mut dc_context_t = dc_context_new(
|
||||
Some(receive_event),
|
||||
receive_event,
|
||||
0 as *mut libc::c_void,
|
||||
b"CLI\x00" as *const u8 as *const libc::c_char,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user