summaryrefslogtreecommitdiffstats
path: root/ffi/src/openpgp/keyid.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-01-09 16:32:30 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-01-09 16:48:53 +0100
commit29280b8898061858d7ff1910d8c004d6d1057019 (patch)
tree1b56dd5699dd1c027123ac459616365b3c1bfadf /ffi/src/openpgp/keyid.rs
parentfd95fa4f42afa73d09a3d32e88acd083fef756d5 (diff)
ffi: Use Option<&mut T> for destructors.
- This reflects the fact that destructors may be called with NULL.
Diffstat (limited to 'ffi/src/openpgp/keyid.rs')
-rw-r--r--ffi/src/openpgp/keyid.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffi/src/openpgp/keyid.rs b/ffi/src/openpgp/keyid.rs
index e4e716bb..6df8ca81 100644
--- a/ffi/src/openpgp/keyid.rs
+++ b/ffi/src/openpgp/keyid.rs
@@ -51,7 +51,7 @@ pub extern "system" fn sq_keyid_from_hex(id: *const c_char) -> *mut KeyID {
/// Frees an `KeyID` object.
#[no_mangle]
-pub extern "system" fn sq_keyid_free(keyid: *mut KeyID) {
+pub extern "system" fn sq_keyid_free(keyid: Option<&mut KeyID>) {
ffi_free!(keyid)
}