use u32 as id as done elsewhere (#3882)

this will avoid some incompatibilities and castingss in UI.
This commit is contained in:
bjoern
2022-12-30 19:53:44 +01:00
committed by GitHub
parent 4e943d52e4
commit bf4ad692df
2 changed files with 4 additions and 4 deletions

View File

@@ -4763,7 +4763,7 @@ char* dc_contact_get_verifier_addr (dc_contact_t* contact);
* we verified the contact ourself. If it is 0, we don't have verifier information or * we verified the contact ourself. If it is 0, we don't have verifier information or
* the contact is not verified. * the contact is not verified.
*/ */
int dc_contact_get_verifier_id (dc_contact_t* contact); uint32_t dc_contact_get_verifier_id (dc_contact_t* contact);
/** /**

View File

@@ -3983,10 +3983,10 @@ pub unsafe extern "C" fn dc_contact_get_verifier_addr(
} }
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn dc_contact_get_verifier_id(contact: *mut dc_contact_t) -> libc::c_int { pub unsafe extern "C" fn dc_contact_get_verifier_id(contact: *mut dc_contact_t) -> u32 {
if contact.is_null() { if contact.is_null() {
eprintln!("ignoring careless call to dc_contact_get_verifier_id()"); eprintln!("ignoring careless call to dc_contact_get_verifier_id()");
return 0 as libc::c_int; return 0;
} }
let ffi_contact = &*contact; let ffi_contact = &*contact;
let ctx = &*ffi_contact.context; let ctx = &*ffi_contact.context;
@@ -3995,7 +3995,7 @@ pub unsafe extern "C" fn dc_contact_get_verifier_id(contact: *mut dc_contact_t)
.unwrap_or_default() .unwrap_or_default()
.unwrap_or_default(); .unwrap_or_default();
contact_id.to_u32() as libc::c_int contact_id.to_u32()
} }
// dc_lot_t // dc_lot_t