Return Vec from dc_get_chat_contacts

This commit is contained in:
Alexander Krotov
2019-08-11 20:59:54 +03:00
parent 39fbff5fb6
commit fb7bbac524
6 changed files with 35 additions and 64 deletions

View File

@@ -472,7 +472,7 @@ impl<'a> Contact<'a> {
context: &Context,
listflags: u32,
query: Option<impl AsRef<str>>,
) -> Result<*mut dc_array_t> {
) -> Result<Vec<u32>> {
let self_addr = context
.get_config(Config::ConfiguredAddr)
.unwrap_or_default();
@@ -548,7 +548,7 @@ impl<'a> Contact<'a> {
ret.push(DC_CONTACT_ID_SELF as u32);
}
Ok(dc_array_t::from(ret).into_raw())
Ok(ret)
}
pub fn get_blocked_cnt(context: &Context) -> usize {