diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-02-04 13:28:30 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-02-05 17:17:39 +0100 |
commit | 46b7c84f0d8fbb7d8659d70477b26d41ce4d4337 (patch) | |
tree | 3f5b10c99a99ec11c159aeea318b0289747631de /openpgp-ffi/src/common.rs | |
parent | 33233a5743ae333679b3f7300fa552fbbc3d5b48 (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/common.rs')
-rw-r--r-- | openpgp-ffi/src/common.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/openpgp-ffi/src/common.rs b/openpgp-ffi/src/common.rs index 9d430a69..ba2ce7d2 100644 --- a/openpgp-ffi/src/common.rs +++ b/openpgp-ffi/src/common.rs @@ -327,7 +327,7 @@ fn revocation_status_to_int(rs: &RevocationStatus) -> c_int { } /// Returns the TPK's revocation status variant. -#[::ffi_catch_abort] #[no_mangle] +#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "system" fn pgp_revocation_status_variant( rs: *mut RevocationStatus) -> c_int @@ -339,7 +339,7 @@ pub extern "system" fn pgp_revocation_status_variant( } /// Frees a pgp_revocation_status_t. -#[::ffi_catch_abort] #[no_mangle] +#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "system" fn pgp_revocation_status_free( rs: Option<&mut RevocationStatus>) { @@ -349,7 +349,7 @@ pub extern "system" fn pgp_revocation_status_free( // Secret. /// Creates an pgp_secret_t from a decrypted session key. -#[::ffi_catch_abort] #[no_mangle] +#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub fn pgp_secret_cached<'a>(algo: u8, session_key: *const u8, session_key_len: size_t) @@ -398,7 +398,7 @@ pub struct VerificationResults<'a> { /// This function returns the verification results for a particular /// level. The result is an array of references to /// `VerificationResult`. -#[::ffi_catch_abort] #[no_mangle] +#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub fn pgp_verification_results_at_level<'a>(results: *const VerificationResults<'a>, level: size_t, r: *mut *const &'a VerificationResult, @@ -417,7 +417,7 @@ pub fn pgp_verification_results_at_level<'a>(results: *const VerificationResults } /// Returns the verification result code. -#[::ffi_catch_abort] #[no_mangle] +#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub fn pgp_verification_result_code(result: *const VerificationResult) -> c_int { @@ -430,7 +430,7 @@ pub fn pgp_verification_result_code(result: *const VerificationResult) } /// Returns the verification result code. -#[::ffi_catch_abort] #[no_mangle] +#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub fn pgp_verification_result_signature(result: *const VerificationResult) -> *const self::openpgp::packet::Signature { @@ -445,7 +445,7 @@ pub fn pgp_verification_result_signature(result: *const VerificationResult) } /// Returns the verification result code. -#[::ffi_catch_abort] #[no_mangle] +#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub fn pgp_verification_result_level(result: *const VerificationResult) -> c_int { @@ -622,7 +622,7 @@ fn verify_real<'a>(input: &'a mut Box<'a + Read>, /// treated as opaque containers. /// /// Note: output may be NULL, if the output is not required. -#[::ffi_catch_abort] #[no_mangle] +#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub fn pgp_verify<'a>(errp: Option<&mut *mut ::error::Error>, input: *mut Box<'a + Read>, dsig: Option<&'a mut Box<'a + Read>>, @@ -745,7 +745,7 @@ fn decrypt_real<'a>(input: &'a mut Box<'a + Read>, /// first parameter to each of them. /// /// Note: all of the parameters are required; none may be NULL. -#[::ffi_catch_abort] #[no_mangle] +#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub fn pgp_decrypt<'a>(errp: Option<&mut *mut ::error::Error>, input: *mut Box<'a + Read>, output: *mut Box<'a + Write>, |