mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 19:06:35 +03:00
Replace dc_array_t with Vec in context.rs
This commit is contained in:
committed by
holger krekel
parent
799d362654
commit
6b2fe03d08
11
src/chat.rs
11
src/chat.rs
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user