refactor: unsafe, CStr and libc moved out

This commit is contained in:
dignifiedquire
2019-12-02 15:29:47 +01:00
parent e6f737be9d
commit 25ab59eb93
17 changed files with 398 additions and 459 deletions

View File

@@ -101,16 +101,6 @@ fn main() {
thread::sleep(duration);
// let msglist = dc_get_chat_msgs(&ctx, chat_id, 0, 0);
// for i in 0..dc_array_get_cnt(msglist) {
// let msg_id = dc_array_get_id(msglist, i);
// let msg = dc_get_msg(context, msg_id);
// let text = CStr::from_ptr(dc_msg_get_text(msg)).unwrap();
// println!("Message {}: {}\n", i + 1, text.to_str().unwrap());
// dc_msg_unref(msg);
// }
// dc_array_unref(msglist);
println!("stopping threads");
*running.write().unwrap() = false;