mirror of
https://github.com/simonask/libyaml-safer
synced 2024-11-14 23:57:12 +00:00
Switch to specific integer widths
This commit is contained in:
parent
a99695f989
commit
3b26dd0b96
4 changed files with 12 additions and 5 deletions
|
@ -1,5 +1,6 @@
|
|||
#![warn(clippy::pedantic)]
|
||||
#![allow(
|
||||
clippy::cast_lossless,
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_possible_wrap,
|
||||
clippy::cast_sign_loss,
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#![warn(clippy::pedantic)]
|
||||
#![allow(
|
||||
clippy::cast_lossless,
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_possible_wrap,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::items_after_statements,
|
||||
clippy::let_underscore_drop,
|
||||
|
|
12
src/lib.rs
12
src/lib.rs
|
@ -28,9 +28,15 @@
|
|||
use std::mem;
|
||||
|
||||
pub mod libc {
|
||||
pub use std::os::raw::{
|
||||
c_char, c_int, c_long, c_schar, c_uchar, c_uint, c_ulong, c_ushort, c_void,
|
||||
};
|
||||
pub use std::os::raw::c_void;
|
||||
pub type c_char = i8;
|
||||
pub type c_int = i32;
|
||||
pub type c_long = i64;
|
||||
pub type c_schar = i8;
|
||||
pub type c_uchar = u8;
|
||||
pub type c_uint = u32;
|
||||
pub type c_ulong = u64;
|
||||
pub type c_ushort = u16;
|
||||
}
|
||||
|
||||
#[macro_use]
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
use crate::libc;
|
||||
pub type size_t = libc::c_ulong;
|
||||
pub type __off_t = libc::c_long;
|
||||
pub type __off64_t = libc::c_long;
|
||||
pub type yaml_char_t = libc::c_uchar;
|
||||
#[derive(Copy, Clone)]
|
||||
#[repr(C)]
|
||||
|
|
Loading…
Reference in a new issue