Replace dc_array_t with Vec in context.rs

This commit is contained in:
Alexander Krotov
2019-08-17 16:54:52 +03:00
committed by holger krekel
parent 799d362654
commit 6b2fe03d08
4 changed files with 24 additions and 47 deletions

View File

@@ -1049,12 +1049,7 @@ pub unsafe fn get_draft(context: &Context, chat_id: u32) -> *mut dc_msg_t {
draft_msg
}
pub fn get_chat_msgs(
context: &Context,
chat_id: u32,
flags: u32,
marker1before: u32,
) -> *mut dc_array_t {
pub fn get_chat_msgs(context: &Context, chat_id: u32, flags: u32, marker1before: u32) -> Vec<u32> {
let mut ret = Vec::new();
let mut last_day = 0;
@@ -1123,9 +1118,9 @@ pub fn get_chat_msgs(
};
if success.is_ok() {
dc_array_t::from(ret).into_raw()
ret
} else {
0 as *mut dc_array_t
Vec::new()
}
}