refactor(chat): improve field types by using enums and bools

This commit is contained in:
dignifiedquire
2019-08-14 20:37:36 +02:00
parent 4878192a25
commit c8ce099f22
12 changed files with 272 additions and 266 deletions

View File

@@ -1276,7 +1276,7 @@ pub unsafe extern "C" fn dc_chat_get_id(chat: *mut dc_chat_t) -> u32 {
pub unsafe extern "C" fn dc_chat_get_type(chat: *mut dc_chat_t) -> libc::c_int {
assert!(!chat.is_null());
dc_chat::dc_chat_get_type(chat)
dc_chat::dc_chat_get_type(chat) as libc::c_int
}
#[no_mangle]
@@ -1311,7 +1311,7 @@ pub unsafe extern "C" fn dc_chat_get_color(chat: *mut dc_chat_t) -> u32 {
pub unsafe extern "C" fn dc_chat_get_archived(chat: *mut dc_chat_t) -> libc::c_int {
assert!(!chat.is_null());
dc_chat::dc_chat_get_archived(chat)
dc_chat::dc_chat_get_archived(chat) as libc::c_int
}
#[no_mangle]
@@ -1339,7 +1339,7 @@ pub unsafe extern "C" fn dc_chat_is_verified(chat: *mut dc_chat_t) -> libc::c_in
pub unsafe extern "C" fn dc_chat_is_sending_locations(chat: *mut dc_chat_t) -> libc::c_int {
assert!(!chat.is_null());
dc_chat::dc_chat_is_sending_locations(chat)
dc_chat::dc_chat_is_sending_locations(chat) as libc::c_int
}
// dc_msg_t