summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi/src
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-06-26 10:41:35 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-06-26 10:41:35 +0200
commit2a4cb58fc9e680bb2bf3fe268ca96147cbe903ef (patch)
treea55cb61beb8285de5e38429eb416d6a6c608d067 /openpgp-ffi/src
parent16553c8bd46f16811691bb0f657e0ee6593697ef (diff)
openpgp-ffi, ffi, ffi-macros: Avoid deprecated integer types.
Diffstat (limited to 'openpgp-ffi/src')
-rw-r--r--openpgp-ffi/src/armor.rs4
-rw-r--r--openpgp-ffi/src/crypto.rs6
-rw-r--r--openpgp-ffi/src/fingerprint.rs6
-rw-r--r--openpgp-ffi/src/io.rs10
-rw-r--r--openpgp-ffi/src/keyid.rs4
-rw-r--r--openpgp-ffi/src/packet/mod.rs10
-rw-r--r--openpgp-ffi/src/packet/pkesk.rs6
-rw-r--r--openpgp-ffi/src/packet/skesk.rs8
-rw-r--r--openpgp-ffi/src/packet/user_attribute.rs4
-rw-r--r--openpgp-ffi/src/packet/userid.rs6
-rw-r--r--openpgp-ffi/src/parse/mod.rs12
-rw-r--r--openpgp-ffi/src/parse/stream.rs12
-rw-r--r--openpgp-ffi/src/serialize.rs16
-rw-r--r--openpgp-ffi/src/tpk.rs4
14 files changed, 54 insertions, 54 deletions
diff --git a/openpgp-ffi/src/armor.rs b/openpgp-ffi/src/armor.rs
index a0e6a203..cb352ca1 100644
--- a/openpgp-ffi/src/armor.rs
+++ b/openpgp-ffi/src/armor.rs
@@ -8,7 +8,7 @@ use std::mem::size_of;
use std::ptr;
use std::slice;
use std::io;
-use libc::{self, uint8_t, c_char, c_int, size_t};
+use libc::{self, c_char, c_int, size_t};
extern crate sequoia_openpgp;
use self::sequoia_openpgp::armor;
@@ -202,7 +202,7 @@ pub extern "C" fn pgp_armor_reader_from_file(errp: Option<&mut *mut ::error::Err
/// pgp_reader_free (armor);
/// ```
#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C"
-fn pgp_armor_reader_from_bytes(b: *const uint8_t, len: size_t,
+fn pgp_armor_reader_from_bytes(b: *const u8, len: size_t,
mode: c_int)
-> *mut Reader {
assert!(!b.is_null());
diff --git a/openpgp-ffi/src/crypto.rs b/openpgp-ffi/src/crypto.rs
index ab5eca2b..2e3ef661 100644
--- a/openpgp-ffi/src/crypto.rs
+++ b/openpgp-ffi/src/crypto.rs
@@ -4,7 +4,7 @@
//!
//! [`sequoia-openpgp::crypto`]: ../../sequoia_openpgp/crypto/index.html
-use libc::{size_t, uint8_t};
+use libc::size_t;
use nettle::Yarrow;
extern crate sequoia_openpgp as openpgp;
@@ -32,7 +32,7 @@ fn pgp_session_key_new(size: size_t) -> *mut SessionKey {
/// Creates a new session key from a buffer.
#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C"
-fn pgp_session_key_from_bytes(buf: *const uint8_t, size: size_t)
+fn pgp_session_key_from_bytes(buf: *const u8, size: size_t)
-> *mut SessionKey {
let buf = unsafe {
::std::slice::from_raw_parts(buf, size)
@@ -49,7 +49,7 @@ pub struct Password(openpgp::crypto::Password);
/// Creates a new password from a buffer.
#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C"
-fn pgp_password_from_bytes(buf: *const uint8_t, size: size_t) -> *mut Password {
+fn pgp_password_from_bytes(buf: *const u8, size: size_t) -> *mut Password {
let buf = unsafe {
::std::slice::from_raw_parts(buf, size)
};
diff --git a/openpgp-ffi/src/fingerprint.rs b/openpgp-ffi/src/fingerprint.rs
index a575d136..e040b6ce 100644
--- a/openpgp-ffi/src/fingerprint.rs
+++ b/openpgp-ffi/src/fingerprint.rs
@@ -11,7 +11,7 @@
//! [`sequoia-openpgp::Fingerprint`]: ../../sequoia_openpgp/enum.Fingerprint.html
use std::slice;
-use libc::{uint8_t, c_char, size_t};
+use libc::{c_char, size_t};
extern crate sequoia_openpgp as openpgp;
use super::keyid::KeyID;
@@ -36,7 +36,7 @@ pub struct Fingerprint(openpgp::Fingerprint);
/// Reads a binary fingerprint.
#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C"
-fn pgp_fingerprint_from_bytes(buf: *const uint8_t,
+fn pgp_fingerprint_from_bytes(buf: *const u8,
len: size_t)
-> *mut Fingerprint {
assert!(!buf.is_null());
@@ -80,7 +80,7 @@ fn pgp_fingerprint_from_hex(hex: *const c_char)
#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C"
fn pgp_fingerprint_as_bytes(fp: *const Fingerprint,
fp_len: Option<&mut size_t>)
- -> *const uint8_t {
+ -> *const u8 {
let fp = fp.ref_raw();
if let Some(p) = fp_len {
*p = fp.as_slice().len();
diff --git a/openpgp-ffi/src/io.rs b/openpgp-ffi/src/io.rs
index 5698c955..605fa04e 100644
--- a/openpgp-ffi/src/io.rs
+++ b/openpgp-ffi/src/io.rs
@@ -4,7 +4,7 @@ use std::fs::File;
use std::io::{self, Read, Write, Cursor};
use std::path::Path;
use std::slice;
-use libc::{uint8_t, c_void, c_char, c_int, size_t, ssize_t, realloc};
+use libc::{c_void, c_char, c_int, size_t, ssize_t, realloc};
#[cfg(unix)]
use std::os::unix::io::FromRawFd;
@@ -63,7 +63,7 @@ pub extern "C" fn pgp_reader_from_fd(fd: c_int)
/// Creates a reader from a buffer.
#[::sequoia_ffi_macros::extern_fn] #[no_mangle]
-pub extern "C" fn pgp_reader_from_bytes(buf: *const uint8_t,
+pub extern "C" fn pgp_reader_from_bytes(buf: *const u8,
len: size_t)
-> *mut Reader {
assert!(!buf.is_null());
@@ -77,7 +77,7 @@ pub extern "C" fn pgp_reader_from_bytes(buf: *const uint8_t,
#[::sequoia_ffi_macros::extern_fn] #[no_mangle]
pub extern "C" fn pgp_reader_read(errp: Option<&mut *mut ::error::Error>,
reader: *mut Reader,
- buf: *mut uint8_t, len: size_t)
+ buf: *mut u8, len: size_t)
-> ssize_t {
assert!(!buf.is_null());
let buf = unsafe {
@@ -165,7 +165,7 @@ fn pgp_writer_from_fd(fd: c_int) -> *mut Writer {
/// Creates a writer from a buffer.
#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C"
-fn pgp_writer_from_bytes(buf: *mut uint8_t, len: size_t) -> *mut Writer {
+fn pgp_writer_from_bytes(buf: *mut u8, len: size_t) -> *mut Writer {
assert!(!buf.is_null());
let buf = unsafe {
slice::from_raw_parts_mut(buf, len as usize)
@@ -232,7 +232,7 @@ impl Write for WriterAlloc {
#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C"
fn pgp_writer_write(errp: Option<&mut *mut ::error::Error>,
writer: *mut Writer,
- buf: *const uint8_t, len: size_t)
+ buf: *const u8, len: size_t)
-> ssize_t {
assert!(!buf.is_null());
let buf = unsafe {
diff --git a/openpgp-ffi/src/keyid.rs b/openpgp-ffi/src/keyid.rs
index 1b5eeb99..5336bbc8 100644
--- a/openpgp-ffi/src/keyid.rs
+++ b/openpgp-ffi/src/keyid.rs
@@ -11,7 +11,7 @@
//! [`sequoia-openpgp::KeyID`]: ../../sequoia_openpgp/enum.KeyID.html
use std::slice;
-use libc::{uint8_t, c_char};
+use libc::{c_char};
extern crate sequoia_openpgp as openpgp;
@@ -53,7 +53,7 @@ pub struct KeyID(openpgp::KeyID);
/// free (mr_b_as_string);
/// ```
#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C"
-fn pgp_keyid_from_bytes(id: *const uint8_t) -> *mut KeyID {
+fn pgp_keyid_from_bytes(id: *const u8) -> *mut KeyID {
assert!(!id.is_null());
let id = unsafe { slice::from_raw_parts(id, 8) };
openpgp::KeyID::from_bytes(id).move_into_raw()
diff --git a/openpgp-ffi/src/packet/mod.rs b/openpgp-ffi/src/packet/mod.rs
index 49218547..b1bf69dd 100644
--- a/openpgp-ffi/src/packet/mod.rs
+++ b/openpgp-ffi/src/packet/mod.rs
@@ -4,7 +4,7 @@
//!
//! [Section 4 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-4
-use libc::{uint8_t, c_char};
+use libc::c_char;
extern crate sequoia_openpgp as openpgp;
extern crate time;
@@ -55,8 +55,8 @@ pub struct Packet(openpgp::Packet);
///
/// [Section 4.3 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-4.3
#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C"
-fn pgp_packet_tag(p: *const Packet) -> uint8_t {
- u8::from(p.ref_raw().tag()) as uint8_t
+fn pgp_packet_tag(p: *const Packet) -> u8 {
+ u8::from(p.ref_raw().tag()) as u8
}
/// Returns the parsed `Packet's` corresponding OpenPGP tag.
@@ -67,7 +67,7 @@ fn pgp_packet_tag(p: *const Packet) -> uint8_t {
/// into an `Packet::Unknown`. `tag()` returns `PGP_TAG_SIGNATURE`,
/// whereas `kind()` returns `0`.
#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C"
-fn pgp_packet_kind(p: *const Packet) -> uint8_t {
+fn pgp_packet_kind(p: *const Packet) -> u8 {
if let Some(kind) = p.ref_raw().kind() {
kind.into()
} else {
@@ -85,7 +85,7 @@ fn pgp_packet_kind(p: *const Packet) -> uint8_t {
/// assert (strcmp (pgp_tag_to_string (2), "SIGNATURE") == 0);
/// ```
#[::sequoia_ffi_macros::extern_fn] #[no_mangle]
-pub extern "C" fn pgp_tag_to_string(tag: uint8_t) -> *const c_char {
+pub extern "C" fn pgp_tag_to_string(tag: u8) -> *const c_char {
match Tag::from(tag) {
Tag::PKESK => "PKESK\x00",
Tag::Signature => "SIGNATURE\x00",
diff --git a/openpgp-ffi/src/packet/pkesk.rs b/openpgp-ffi/src/packet/pkesk.rs
index e50f0cc9..407336f8 100644
--- a/openpgp-ffi/src/packet/pkesk.rs
+++ b/openpgp-ffi/src/packet/pkesk.rs
@@ -1,7 +1,7 @@
//! Asymmetrically encrypted session keys.
use failure;
-use libc::{uint8_t, size_t};
+use libc::size_t;
extern crate sequoia_openpgp as openpgp;
use self::openpgp::packet::PKESK;
@@ -34,8 +34,8 @@ pub extern "C" fn pgp_pkesk_recipient(pkesk: *const PKESK)
pub extern "C" fn pgp_pkesk_decrypt(errp: Option<&mut *mut ::error::Error>,
pkesk: *const PKESK,
secret_key: *const Key,
- algo: *mut uint8_t, // XXX
- key: *mut uint8_t,
+ algo: *mut u8, // XXX
+ key: *mut u8,
key_len: *mut size_t)
-> Status {
ffi_make_fry_from_errp!(errp);
diff --git a/openpgp-ffi/src/packet/skesk.rs b/openpgp-ffi/src/packet/skesk.rs
index 06653604..7f5305f3 100644
--- a/openpgp-ffi/src/packet/skesk.rs
+++ b/openpgp-ffi/src/packet/skesk.rs
@@ -1,7 +1,7 @@
//! Symmetrically encrypted session keys.
use std::slice;
-use libc::{uint8_t, size_t};
+use libc::size_t;
use failure;
extern crate sequoia_openpgp as openpgp;
@@ -19,10 +19,10 @@ use RefRaw;
#[::sequoia_ffi_macros::extern_fn] #[no_mangle]
pub extern "C" fn pgp_skesk_decrypt(errp: Option<&mut *mut ::error::Error>,
skesk: *const Packet,
- password: *const uint8_t,
+ password: *const u8,
password_len: size_t,
- algo: *mut uint8_t, // XXX
- key: *mut uint8_t,
+ algo: *mut u8, // XXX
+ key: *mut u8,
key_len: *mut size_t)
-> Status {
ffi_make_fry_from_errp!(errp);
diff --git a/openpgp-ffi/src/packet/user_attribute.rs b/openpgp-ffi/src/packet/user_attribute.rs
index c26e9cce..1045b6d0 100644
--- a/openpgp-ffi/src/packet/user_attribute.rs
+++ b/openpgp-ffi/src/packet/user_attribute.rs
@@ -4,7 +4,7 @@
//!
//! [Section 5.12 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-5.12
-use libc::{uint8_t, size_t};
+use libc::size_t;
extern crate sequoia_openpgp as openpgp;
use super::Packet;
@@ -17,7 +17,7 @@ use RefRaw;
#[::sequoia_ffi_macros::extern_fn] #[no_mangle]
pub extern "C" fn pgp_user_attribute_value(ua: *const Packet,
value_len: Option<&mut size_t>)
- -> *const uint8_t {
+ -> *const u8 {
if let &openpgp::Packet::UserAttribute(ref ua) = ua.ref_raw() {
if let Some(p) = value_len {
*p = ua.value().len();
diff --git a/openpgp-ffi/src/packet/userid.rs b/openpgp-ffi/src/packet/userid.rs
index 34c4da33..ce59161f 100644
--- a/openpgp-ffi/src/packet/userid.rs
+++ b/openpgp-ffi/src/packet/userid.rs
@@ -5,7 +5,7 @@
//! [Section 5.11 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-5.11
extern crate sequoia_openpgp as openpgp;
-use libc::{uint8_t, c_char, size_t};
+use libc::{c_char, size_t};
use error::Status;
use super::Packet;
@@ -105,7 +105,7 @@ fn pgp_user_id_from_unchecked_address(
/// `value` need not be valid UTF-8.
#[::sequoia_ffi_macros::extern_fn] #[no_mangle]
pub extern "C"
-fn pgp_user_id_from_raw(value: *const uint8_t, len: size_t)
+fn pgp_user_id_from_raw(value: *const u8, len: size_t)
-> *mut Packet
{
let value : &[u8] = unsafe { std::slice::from_raw_parts(value, len) };
@@ -120,7 +120,7 @@ fn pgp_user_id_from_raw(value: *const uint8_t, len: size_t)
#[::sequoia_ffi_macros::extern_fn] #[no_mangle]
pub extern "C"
fn pgp_user_id_value(uid: *const Packet, value_len: Option<&mut size_t>)
- -> *const uint8_t
+ -> *const u8
{
if let &openpgp::Packet::UserID(ref uid) = uid.ref_raw() {
if let Some(p) = value_len {
diff --git a/openpgp-ffi/src/parse/mod.rs b/openpgp-ffi/src/parse/mod.rs
index df13bcbd..d1b953d1 100644
--- a/openpgp-ffi/src/parse/mod.rs
+++ b/openpgp-ffi/src/parse/mod.rs
@@ -9,7 +9,7 @@
use std::mem::forget;
use std::ptr;
use std::slice;
-use libc::{uint8_t, c_char, c_int, size_t};
+use libc::{c_char, c_int, size_t};
extern crate sequoia_openpgp as openpgp;
extern crate time;
@@ -64,7 +64,7 @@ pub extern "C" fn pgp_packet_parser_from_file
/// the stream.
#[::sequoia_ffi_macros::extern_fn] #[no_mangle]
pub extern "C" fn pgp_packet_parser_from_bytes
- (errp: Option<&mut *mut ::error::Error>, b: *const uint8_t, len: size_t)
+ (errp: Option<&mut *mut ::error::Error>, b: *const u8, len: size_t)
-> *mut PacketParserResult<'static> {
ffi_make_fry_from_errp!(errp);
assert!(!b.is_null());
@@ -125,7 +125,7 @@ pub extern "C" fn pgp_packet_parser_packet
#[::sequoia_ffi_macros::extern_fn] #[no_mangle]
pub extern "C" fn pgp_packet_parser_recursion_depth
(pp: *const PacketParser)
- -> uint8_t {
+ -> u8 {
let pp = ffi_param_ref!(pp);
pp.recursion_depth() as u8
}
@@ -276,7 +276,7 @@ pub extern "C" fn pgp_packet_parser_buffer_unread_content<'a>
(errp: Option<&mut *mut ::error::Error>,
pp: *mut PacketParser<'a>,
len: *mut usize)
- -> *const uint8_t {
+ -> *const u8 {
ffi_make_fry_from_errp!(errp);
let pp = ffi_param_ref_mut!(pp);
let len = ffi_param_ref_mut!(len);
@@ -327,8 +327,8 @@ pub extern "C" fn pgp_packet_parser_finish<'a>
pub extern "C" fn pgp_packet_parser_decrypt<'a>
(errp: Option<&mut *mut ::error::Error>,
pp: *mut PacketParser<'a>,
- algo: uint8_t, // XXX
- key: *const uint8_t, key_len: size_t)
+ algo: u8, // XXX
+ key: *const u8, key_len: size_t)
-> Status {
ffi_make_fry_from_errp!(errp);
let pp = ffi_param_ref_mut!(pp);
diff --git a/openpgp-ffi/src/parse/stream.rs b/openpgp-ffi/src/parse/stream.rs
index b887f5e6..f31124aa 100644
--- a/openpgp-ffi/src/parse/stream.rs
+++ b/openpgp-ffi/src/parse/stream.rs
@@ -11,7 +11,7 @@
//! [`sequoia-openpgp::parse::stream`]: ../../../sequoia_openpgp/parse/stream/index.html
use std::ptr;
-use libc::{c_int, c_void, uint8_t, time_t};
+use libc::{c_int, c_void, time_t};
extern crate sequoia_openpgp as openpgp;
extern crate time;
@@ -91,7 +91,7 @@ fn pgp_message_layer_variant(result: *const MessageLayer)
/// members if the corresponding parameter is not `NULL`.
#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C"
fn pgp_message_layer_compression(v: *const MessageLayer,
- algo_r: Maybe<uint8_t>)
+ algo_r: Maybe<u8>)
-> bool
{
use self::stream::MessageLayer::*;
@@ -112,8 +112,8 @@ fn pgp_message_layer_compression(v: *const MessageLayer,
/// members if the corresponding parameter is not `NULL`.
#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C"
fn pgp_message_layer_encryption(v: *const MessageLayer,
- sym_algo_r: Maybe<uint8_t>,
- aead_algo_r: Maybe<uint8_t>)
+ sym_algo_r: Maybe<u8>,
+ aead_algo_r: Maybe<u8>)
-> bool
{
use self::stream::MessageLayer::*;
@@ -298,7 +298,7 @@ type InspectCallback = fn(*mut HelperCookie, *const PacketParser) -> Status;
type DecryptCallback = fn(*mut HelperCookie,
*const *const PKESK, usize,
*const *const SKESK, usize,
- extern "C" fn (*mut c_void, uint8_t,
+ extern "C" fn (*mut c_void, u8,
*const crypto::SessionKey)
-> Status,
*mut c_void,
@@ -717,7 +717,7 @@ impl DecryptionHelper for DHelper {
// skesks.into_iter().for_each(|o| {
// super::super::packet::skesk::pgp_skesk_free(o) });
- extern "C" fn trampoline<D>(data: *mut c_void, algo: uint8_t,
+ extern "C" fn trampoline<D>(data: *mut c_void, algo: u8,
sk: *const crypto::SessionKey)
-> Status
where D: FnMut(SymmetricAlgorithm, &SessionKey)
diff --git a/openpgp-ffi/src/serialize.rs b/openpgp-ffi/src/serialize.rs
index 653c06a0..a2613c24 100644
--- a/openpgp-ffi/src/serialize.rs
+++ b/openpgp-ffi/src/serialize.rs
@@ -8,7 +8,7 @@
use std::ptr;
use std::slice;
use std::io::Write;
-use libc::{uint8_t, c_char, size_t, ssize_t};
+use libc::{c_char, size_t, ssize_t};
extern crate sequoia_openpgp as openpgp;
extern crate time;
@@ -55,7 +55,7 @@ pub extern "C" fn pgp_writer_stack_message
pub extern "C" fn pgp_writer_stack_write
(errp: Option<&mut *mut ::error::Error>,
writer: *mut writer::Stack<'static, Cookie>,
- buf: *const uint8_t, len: size_t)
+ buf: *const u8, len: size_t)
-> ssize_t
{
ffi_make_fry_from_errp!(errp);
@@ -76,7 +76,7 @@ pub extern "C" fn pgp_writer_stack_write
pub extern "C" fn pgp_writer_stack_write_all
(errp: Option<&mut *mut ::error::Error>,
writer: *mut writer::Stack<'static, Cookie>,
- buf: *const uint8_t, len: size_t)
+ buf: *const u8, len: size_t)
-> Status
{
ffi_make_fry_from_errp!(errp);
@@ -129,7 +129,7 @@ pub extern "C" fn pgp_writer_stack_finalize
pub extern "C" fn pgp_arbitrary_writer_new
(errp: Option<&mut *mut ::error::Error>,
inner: *mut writer::Stack<'static, Cookie>,
- tag: uint8_t)
+ tag: u8)
-> *mut writer::Stack<'static, Cookie>
{
ffi_make_fry_from_errp!(errp);
@@ -152,7 +152,7 @@ pub extern "C" fn pgp_signer_new
inner: *mut writer::Stack<'static, Cookie>,
signers: *const *mut Box<self::openpgp::crypto::Signer>,
signers_len: size_t,
- hash_algo: uint8_t)
+ hash_algo: u8)
-> *mut writer::Stack<'static, Cookie>
{
ffi_make_fry_from_errp!(errp);
@@ -184,7 +184,7 @@ pub extern "C" fn pgp_signer_new_detached
inner: *mut writer::Stack<'static, Cookie>,
signers: *const *mut Box<self::openpgp::crypto::Signer>,
signers_len: size_t,
- hash_algo: uint8_t)
+ hash_algo: u8)
-> *mut writer::Stack<'static, Cookie>
{
ffi_make_fry_from_errp!(errp);
@@ -239,8 +239,8 @@ pub extern "C" fn pgp_encryptor_new
inner: *mut writer::Stack<'static, Cookie>,
passwords: Option<&*const c_char>, passwords_len: size_t,
recipients: Option<&*const TPK>, recipients_len: size_t,
- encryption_mode: uint8_t,
- cipher_algo: uint8_t)
+ encryption_mode: u8,
+ cipher_algo: u8)
-> *mut writer::Stack<'static, Cookie>
{
ffi_make_fry_from_errp!(errp);
diff --git a/openpgp-ffi/src/tpk.rs b/openpgp-ffi/src/tpk.rs
index 259b3a1c..00eaef01 100644
--- a/openpgp-ffi/src/tpk.rs
+++ b/openpgp-ffi/src/tpk.rs
@@ -7,7 +7,7 @@
use std::ptr;
use std::slice;
-use libc::{c_char, c_int, size_t, time_t, uint8_t};
+use libc::{c_char, c_int, size_t, time_t};
extern crate sequoia_openpgp as openpgp;
use self::openpgp::{
@@ -706,7 +706,7 @@ pub struct TPKParserWrapper<'a> {
/// concatenated together.
#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C"
fn pgp_tpk_parser_from_bytes(errp: Option<&mut *mut ::error::Error>,
- buf: *mut uint8_t, len: size_t)
+ buf: *mut u8, len: size_t)
-> *mut TPKParserWrapper<'static>
{
ffi_make_fry_from_errp!(errp);