summaryrefslogtreecommitdiffstats
path: root/ffi/src/error.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/error.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/error.rs')
-rw-r--r--ffi/src/error.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffi/src/error.rs b/ffi/src/error.rs
index 25640556..56a6d27d 100644
--- a/ffi/src/error.rs
+++ b/ffi/src/error.rs
@@ -10,7 +10,7 @@ use sequoia_core as core;
/// Frees an error.
#[no_mangle]
-pub extern "system" fn sq_error_free(error: *mut failure::Error) {
+pub extern "system" fn sq_error_free(error: Option<&mut failure::Error>) {
ffi_free!(error)
}