Replaced the std::os::raw c types with types.rs

This commit is contained in:
Elichai Turkel 2019-02-18 14:31:30 +02:00
parent 11ce86681f
commit ab8066eb1a
No known key found for this signature in database
GPG Key ID: 5607C93B5F86650C
3 changed files with 11 additions and 3 deletions

View File

@ -16,9 +16,11 @@
//! # FFI bindings //! # FFI bindings
//! Direct bindings to the underlying C library functions. These should //! Direct bindings to the underlying C library functions. These should
//! not be needed for most users. //! not be needed for most users.
use std::mem; use core::{mem, hash};
use std::hash; use core::ffi::c_void;
use std::os::raw::{c_int, c_uchar, c_uint, c_void}; use crate::types::*;
// use std::os::raw::{c_int, c_uchar, c_uint, c_void};
/// Flag for context to enable no precomputation /// Flag for context to enable no precomputation
pub const SECP256K1_START_NONE: c_uint = 1; pub const SECP256K1_START_NONE: c_uint = 1;

View File

@ -147,6 +147,7 @@ use core::{fmt, ptr, str};
#[macro_use] #[macro_use]
mod macros; mod macros;
mod types;
pub mod constants; pub mod constants;
pub mod ecdh; pub mod ecdh;
pub mod ffi; pub mod ffi;

5
src/types.rs Normal file
View File

@ -0,0 +1,5 @@
#![allow(non_camel_case_types)]
pub type c_int = i32;
pub type c_uchar = u8;
pub type c_uint = u32;
pub use core::ffi::c_void;