diff options
Diffstat (limited to 'ffi/src/net.rs')
-rw-r--r-- | ffi/src/net.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ffi/src/net.rs b/ffi/src/net.rs index 3f25b643..d99da30c 100644 --- a/ffi/src/net.rs +++ b/ffi/src/net.rs @@ -38,11 +38,11 @@ use sequoia_net::KeyServer; use super::error::Status; use super::core::Context; -use ::openpgp::keyid::KeyID; -use ::openpgp::tpk::TPK; -use ::RefRaw; -use MoveResultIntoRaw; -use Maybe; +use crate::openpgp::keyid::KeyID; +use crate::openpgp::tpk::TPK; +use crate::RefRaw; +use crate::MoveResultIntoRaw; +use crate::Maybe; /// Returns a handle for the given URI. /// @@ -50,7 +50,7 @@ use Maybe; /// e.g. `hkps://examle.org`. /// /// Returns `NULL` on errors. -#[::ffi_catch_abort] #[no_mangle] pub extern "C" +#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C" fn sq_keyserver_new(ctx: *mut Context, uri: *const c_char) -> *mut KeyServer { let ctx = ffi_param_ref_mut!(ctx); ffi_make_fry_from_ctx!(ctx); @@ -66,7 +66,7 @@ fn sq_keyserver_new(ctx: *mut Context, uri: *const c_char) -> *mut KeyServer { /// size `len` used to authenticate the server. /// /// Returns `NULL` on errors. -#[::ffi_catch_abort] #[no_mangle] pub extern "C" +#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C" fn sq_keyserver_with_cert(ctx: *mut Context, uri: *const c_char, cert: *const u8, @@ -95,7 +95,7 @@ fn sq_keyserver_with_cert(ctx: *mut Context, /// included in this library. It is a good default choice. /// /// Returns `NULL` on errors. -#[::ffi_catch_abort] #[no_mangle] pub extern "C" +#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C" fn sq_keyserver_sks_pool(ctx: *mut Context) -> *mut KeyServer { let ctx = ffi_param_ref_mut!(ctx); ffi_make_fry_from_ctx!(ctx); @@ -103,7 +103,7 @@ fn sq_keyserver_sks_pool(ctx: *mut Context) -> *mut KeyServer { } /// Frees a keyserver object. -#[::ffi_catch_abort] #[no_mangle] pub extern "C" +#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C" fn sq_keyserver_free(ks: Option<&mut KeyServer>) { ffi_free!(ks) } @@ -111,7 +111,7 @@ fn sq_keyserver_free(ks: Option<&mut KeyServer>) { /// Retrieves the key with the given `keyid`. /// /// Returns `NULL` on errors. -#[::ffi_catch_abort] #[no_mangle] pub extern "C" +#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C" fn sq_keyserver_get(ctx: *mut Context, ks: *mut KeyServer, id: *const KeyID) @@ -127,7 +127,7 @@ fn sq_keyserver_get(ctx: *mut Context, /// Sends the given key to the server. /// /// Returns != 0 on errors. -#[::ffi_catch_abort] #[no_mangle] pub extern "C" +#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C" fn sq_keyserver_send(ctx: *mut Context, ks: *mut KeyServer, tpk: *const TPK) |