mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 01:46:34 +03:00
Rename dc_chat_t to Chat
This clears the way to start working on making the functions safe. But small PRs are good PRs so let's get this rename out of the way and have future PRs less noisy. Also stop making this #[repr(C)] and start making fields that are not used private. Lastly clean up some comments by moving them or deleting them, so they make sense again after the translation.
This commit is contained in:
@@ -377,7 +377,7 @@ pub unsafe fn dc_cmdline_skip_auth() {
|
||||
S_IS_AUTH = 1;
|
||||
}
|
||||
|
||||
unsafe fn chat_prefix(chat: *const dc_chat_t) -> &'static str {
|
||||
unsafe fn chat_prefix(chat: *const Chat) -> &'static str {
|
||||
if (*chat).type_0 == 120 {
|
||||
"Group"
|
||||
} else if (*chat).type_0 == 130 {
|
||||
@@ -787,7 +787,7 @@ pub unsafe fn dc_cmdline(context: &Context, line: &str) -> Result<(), failure::E
|
||||
let chat_id_0: libc::c_int =
|
||||
dc_create_chat_by_msg_id(context, msg_id_0 as uint32_t) as libc::c_int;
|
||||
if chat_id_0 != 0 {
|
||||
let chat_0: *mut dc_chat_t = dc_get_chat(context, chat_id_0 as uint32_t);
|
||||
let chat_0: *mut Chat = dc_get_chat(context, chat_id_0 as uint32_t);
|
||||
println!(
|
||||
"{}#{} created successfully.",
|
||||
chat_prefix(chat_0),
|
||||
|
||||
Reference in New Issue
Block a user