diff options
author | Wiktor Kwapisiewicz <wiktor@metacode.biz> | 2020-04-01 11:21:33 +0200 |
---|---|---|
committer | Wiktor Kwapisiewicz <wiktor@metacode.biz> | 2020-04-03 15:11:08 +0200 |
commit | 9fa0c1972a9f36e3a55da95d4eed44601d4a3f9f (patch) | |
tree | 5cebc2b5ea251e485737eb6f5ec1fbcb076a959a /openpgp-ffi/src | |
parent | b0dbca2064163a41f73559d787456e8bab7b5cb9 (diff) |
Change function names to align to Rust naming conventions.
- Change `mark_parts_public` to `parts_into_public`,
- Change `mark_parts_public_ref` to `parts_as_public`,
- Change `mark_parts_secret` to `parts_into_secret`,
- Change `mark_parts_secret_ref` to `parts_as_secret`,
- Change `mark_parts_unspecified` to `parts_into_unspecified`,
- Change `mark_parts_unspecified_ref` to `parts_as_unspecified`,
- Fixes #452.
Diffstat (limited to 'openpgp-ffi/src')
-rw-r--r-- | openpgp-ffi/src/cert.rs | 6 | ||||
-rw-r--r-- | openpgp-ffi/src/key_amalgamation.rs | 4 | ||||
-rw-r--r-- | openpgp-ffi/src/packet/key.rs | 2 | ||||
-rw-r--r-- | openpgp-ffi/src/packet/pkesk.rs | 2 | ||||
-rw-r--r-- | openpgp-ffi/src/parse/stream.rs | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/openpgp-ffi/src/cert.rs b/openpgp-ffi/src/cert.rs index fdc95ed1..2d57677f 100644 --- a/openpgp-ffi/src/cert.rs +++ b/openpgp-ffi/src/cert.rs @@ -146,7 +146,7 @@ fn pgp_cert_as_tsk(cert: *const Cert) -> *mut TSK<'static> { #[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C" fn pgp_cert_primary_key(cert: *const Cert) -> *const Key { let key = cert.ref_raw().primary_key().key() - .mark_parts_unspecified_ref().mark_role_unspecified_ref(); + .parts_as_unspecified().mark_role_unspecified_ref(); key.move_into_raw() } @@ -611,7 +611,7 @@ pub extern "C" fn pgp_cert_key_iter_next<'a>( iter_wrapper.next_called = true; if let Some(ka) = iter_wrapper.iter.as_mut().unwrap().next() { - Some(ka.mark_parts_unspecified()).move_into_raw() + Some(ka.parts_into_unspecified()).move_into_raw() } else { None } @@ -843,7 +843,7 @@ pub extern "C" fn pgp_cert_valid_key_iter_next<'a>( *ptr = rs.move_into_raw(); } - Some(ka.mark_parts_unspecified()).move_into_raw() + Some(ka.parts_into_unspecified()).move_into_raw() } else { None } diff --git a/openpgp-ffi/src/key_amalgamation.rs b/openpgp-ffi/src/key_amalgamation.rs index 374770c2..e2dc31c4 100644 --- a/openpgp-ffi/src/key_amalgamation.rs +++ b/openpgp-ffi/src/key_amalgamation.rs @@ -52,7 +52,7 @@ pub extern "C" fn pgp_key_amalgamation_key<'a>(ka: *const KeyAmalgamation<'a>) { let ka = ka.ref_raw(); - ka.key().mark_parts_unspecified_ref().mark_role_unspecified_ref() + ka.key().parts_as_unspecified().mark_role_unspecified_ref() .move_into_raw() } @@ -73,7 +73,7 @@ pub extern "C" fn pgp_valid_key_amalgamation_key<'a>(ka: *const ValidKeyAmalgama { let ka = ka.ref_raw(); - ka.key().mark_parts_unspecified_ref().mark_role_unspecified_ref() + ka.key().parts_as_unspecified().mark_role_unspecified_ref() .move_into_raw() } diff --git a/openpgp-ffi/src/packet/key.rs b/openpgp-ffi/src/packet/key.rs index e774fd43..6966acc1 100644 --- a/openpgp-ffi/src/packet/key.rs +++ b/openpgp-ffi/src/packet/key.rs @@ -82,6 +82,6 @@ fn pgp_key_into_key_pair(errp: Option<&mut *mut crate::error::Error>, -> *mut self::openpgp::crypto::KeyPair { ffi_make_fry_from_errp!(errp); - let key = ffi_try!(key.move_from_raw().mark_parts_secret()); + let key = ffi_try!(key.move_from_raw().parts_into_secret()); ffi_try_box!(key.into_keypair()) } diff --git a/openpgp-ffi/src/packet/pkesk.rs b/openpgp-ffi/src/packet/pkesk.rs index a00c4ff0..94166c11 100644 --- a/openpgp-ffi/src/packet/pkesk.rs +++ b/openpgp-ffi/src/packet/pkesk.rs @@ -43,7 +43,7 @@ pub extern "C" fn pgp_pkesk_decrypt(errp: Option<&mut *mut crate::error::Error>, let algo = ffi_param_ref_mut!(algo); let key_len = ffi_param_ref_mut!(key_len); - match ffi_try_or_status!(secret_key.clone().mark_parts_secret()) + match ffi_try_or_status!(secret_key.clone().parts_into_secret()) .into_keypair() { Ok(mut keypair) => { diff --git a/openpgp-ffi/src/parse/stream.rs b/openpgp-ffi/src/parse/stream.rs index 71e9caba..27f388c3 100644 --- a/openpgp-ffi/src/parse/stream.rs +++ b/openpgp-ffi/src/parse/stream.rs @@ -206,7 +206,7 @@ fn pgp_verification_result_good_checksum<'a>( if let Some(mut p) = key_r { *unsafe { p.as_mut() } = { let key = ka.key() - .mark_parts_unspecified_ref() + .parts_as_unspecified() .mark_role_unspecified_ref(); key.move_into_raw() }; @@ -334,7 +334,7 @@ fn $fn_name<'a>( if let Some(mut p) = key_r { *unsafe { p.as_mut() } = { let key = ka.key() - .mark_parts_unspecified_ref() + .parts_as_unspecified() .mark_role_unspecified_ref(); key.move_into_raw() }; |