summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi
diff options
context:
space:
mode:
Diffstat (limited to 'openpgp-ffi')
-rw-r--r--openpgp-ffi/src/io.rs4
-rw-r--r--openpgp-ffi/src/parse/stream.rs8
2 files changed, 6 insertions, 6 deletions
diff --git a/openpgp-ffi/src/io.rs b/openpgp-ffi/src/io.rs
index b2690db3..ab07961e 100644
--- a/openpgp-ffi/src/io.rs
+++ b/openpgp-ffi/src/io.rs
@@ -74,7 +74,7 @@ pub extern "C" fn pgp_reader_from_bytes(buf: *const u8,
}
/// The callback type for the generic callback-based reader interface.
-type ReaderCallbackFn = fn(*mut c_void, *const c_void, size_t) -> ssize_t;
+type ReaderCallbackFn = extern fn(*mut c_void, *const c_void, size_t) -> ssize_t;
/// Creates an reader from a callback and cookie.
///
@@ -293,7 +293,7 @@ impl Write for WriterAlloc {
}
/// The callback type for the generic callback-based writer interface.
-type WriterCallbackFn = fn(*mut c_void, *const c_void, size_t) -> ssize_t;
+type WriterCallbackFn = extern fn(*mut c_void, *const c_void, size_t) -> ssize_t;
/// Creates an writer from a callback and cookie.
///
diff --git a/openpgp-ffi/src/parse/stream.rs b/openpgp-ffi/src/parse/stream.rs
index abcb76de..ff5de6ed 100644
--- a/openpgp-ffi/src/parse/stream.rs
+++ b/openpgp-ffi/src/parse/stream.rs
@@ -389,7 +389,7 @@ type FreeCallback = fn(*mut c_void);
///
/// If the free callback is not NULL, then it is called to free the
/// returned array of Certs.
-type GetPublicKeysCallback = fn(*mut HelperCookie,
+type GetPublicKeysCallback = extern fn(*mut HelperCookie,
*const *mut keyid::KeyID, usize,
&mut *mut *mut Cert, *mut usize,
*mut FreeCallback) -> Status;
@@ -398,7 +398,7 @@ type GetPublicKeysCallback = fn(*mut HelperCookie,
///
/// This function is called on every packet that the decryptor
/// observes.
-type InspectCallback = fn(*mut HelperCookie, *const PacketParser) -> Status;
+type InspectCallback = extern fn(*mut HelperCookie, *const PacketParser) -> Status;
/// Decrypts the message.
///
@@ -410,7 +410,7 @@ type InspectCallback = fn(*mut HelperCookie, *const PacketParser) -> Status;
///
/// XXX: This needlessly flattens the complex errors returned by the
/// `decrypt` function into a status.
-type DecryptCallback = fn(*mut HelperCookie,
+type DecryptCallback = extern fn(*mut HelperCookie,
*const *const PKESK, usize,
*const *const SKESK, usize,
u8, // XXX SymmetricAlgorithm
@@ -425,7 +425,7 @@ type DecryptCallback = fn(*mut HelperCookie,
///
/// If the result is not Status::Success, then this aborts the
/// Verification.
-type CheckCallback = fn(*mut HelperCookie,
+type CheckCallback = extern fn(*mut HelperCookie,
*const MessageStructure)
-> Status;