mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 23:06:32 +03:00
feat(ffi): install global panic handler (#108)
This commit is contained in:
committed by
Lars-Magnus Skog
parent
5c8bfd4370
commit
a2fc127923
@@ -7,8 +7,8 @@
|
||||
non_snake_case
|
||||
)]
|
||||
|
||||
extern crate deltachat;
|
||||
extern crate libc;
|
||||
#[macro_use]
|
||||
extern crate human_panic;
|
||||
|
||||
use deltachat::*;
|
||||
|
||||
@@ -28,6 +28,8 @@ pub unsafe extern "C" fn dc_context_new(
|
||||
userdata: *mut libc::c_void,
|
||||
os_name: *const libc::c_char,
|
||||
) -> *mut dc_context_t {
|
||||
setup_panic!();
|
||||
|
||||
let ctx = context::dc_context_new(cb, userdata, os_name);
|
||||
Box::into_raw(Box::new(ctx))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user