mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
dc_get_info: accept immutable context
This commit is contained in:
committed by
link2xt
parent
21b18836ca
commit
8301e27f86
@@ -431,7 +431,7 @@ int dc_set_config_from_qr (dc_context_t* context, const char* qr);
|
|||||||
* @param context The context object.
|
* @param context The context object.
|
||||||
* @return String which must be released using dc_str_unref() after usage. Never returns NULL.
|
* @return String which must be released using dc_str_unref() after usage. Never returns NULL.
|
||||||
*/
|
*/
|
||||||
char* dc_get_info (dc_context_t* context);
|
char* dc_get_info (const dc_context_t* context);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ pub unsafe extern "C" fn dc_set_config_from_qr(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn dc_get_info(context: *mut dc_context_t) -> *mut libc::c_char {
|
pub unsafe extern "C" fn dc_get_info(context: *const dc_context_t) -> *mut libc::c_char {
|
||||||
if context.is_null() {
|
if context.is_null() {
|
||||||
eprintln!("ignoring careless call to dc_get_info()");
|
eprintln!("ignoring careless call to dc_get_info()");
|
||||||
return "".strdup();
|
return "".strdup();
|
||||||
|
|||||||
Reference in New Issue
Block a user