mirror of
https://github.com/chatmail/core.git
synced 2026-05-05 14:26:30 +03:00
refactor: reduce dependencies on libc
This commit is contained in:
committed by
Lars-Magnus Skog
parent
518935a938
commit
95d4df6027
@@ -240,9 +240,8 @@ pub unsafe fn dc_block_contact(context: &Context, contact_id: uint32_t, new_bloc
|
||||
pub unsafe fn dc_contact_new<'a>(context: &'a Context) -> *mut dc_contact_t<'a> {
|
||||
let mut contact: *mut dc_contact_t;
|
||||
contact = calloc(1, ::std::mem::size_of::<dc_contact_t>()) as *mut dc_contact_t;
|
||||
if contact.is_null() {
|
||||
exit(19i32);
|
||||
}
|
||||
assert!(!contact.is_null());
|
||||
|
||||
(*contact).magic = 0xc047ac7i32 as uint32_t;
|
||||
(*contact).context = context;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user