summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi/src/crypto.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-02-04 13:28:30 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-02-05 17:17:39 +0100
commit46b7c84f0d8fbb7d8659d70477b26d41ce4d4337 (patch)
tree3f5b10c99a99ec11c159aeea318b0289747631de /openpgp-ffi/src/crypto.rs
parent33233a5743ae333679b3f7300fa552fbbc3d5b48 (diff)
openpgp-ffi: Use a common macro for every exported function.
- This way we can easily introduce new transformations.
Diffstat (limited to 'openpgp-ffi/src/crypto.rs')
-rw-r--r--openpgp-ffi/src/crypto.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/openpgp-ffi/src/crypto.rs b/openpgp-ffi/src/crypto.rs
index eebd7f3a..82bb1707 100644
--- a/openpgp-ffi/src/crypto.rs
+++ b/openpgp-ffi/src/crypto.rs
@@ -11,7 +11,7 @@ use self::sequoia_openpgp::{
};
/// Frees a signer.
-#[::ffi_catch_abort] #[no_mangle]
+#[::sequoia_ffi_macros::extern_fn] #[no_mangle]
pub extern "system" fn pgp_signer_free
(s: Option<&mut &'static mut crypto::Signer>)
{
@@ -19,7 +19,7 @@ pub extern "system" fn pgp_signer_free
}
/// Creates a new key pair.
-#[::ffi_catch_abort] #[no_mangle]
+#[::sequoia_ffi_macros::extern_fn] #[no_mangle]
pub extern "system" fn pgp_key_pair_new
(errp: Option<&mut *mut ::error::Error>, public: *mut Key, secret: *mut crypto::mpis::SecretKey)
-> *mut crypto::KeyPair
@@ -31,7 +31,7 @@ pub extern "system" fn pgp_key_pair_new
}
/// Frees a key pair.
-#[::ffi_catch_abort] #[no_mangle]
+#[::sequoia_ffi_macros::extern_fn] #[no_mangle]
pub extern "system" fn pgp_key_pair_free
(kp: Option<&mut crypto::KeyPair>)
{
@@ -42,7 +42,7 @@ pub extern "system" fn pgp_key_pair_free
///
/// Note that the returned object merely references the key pair, and
/// must not outlive the key pair.
-#[::ffi_catch_abort] #[no_mangle]
+#[::sequoia_ffi_macros::extern_fn] #[no_mangle]
pub extern "system" fn pgp_key_pair_as_signer
(kp: *mut crypto::KeyPair)
-> *mut &'static mut crypto::Signer