Remove size_t to usize conversion rule

This commit is contained in:
Conor McAvity
2019-12-03 17:08:10 -08:00
committed by Emilio Cobos Álvarez
parent 31776988da
commit 71f74d08bf
9 changed files with 23 additions and 10 deletions
+2 -2
View File
@@ -4092,9 +4092,9 @@ mod utils {
"int64_t" => primitive_ty(ctx, "i64"),
"uint64_t" => primitive_ty(ctx, "u64"),
"uintptr_t" | "size_t" => primitive_ty(ctx, "usize"),
"uintptr_t" => primitive_ty(ctx, "usize"),
"intptr_t" | "ptrdiff_t" | "ssize_t" => primitive_ty(ctx, "isize"),
"intptr_t" | "ptrdiff_t" => primitive_ty(ctx, "isize"),
_ => return None,
})
}
+9 -3
View File
@@ -9,6 +9,7 @@
#![cfg(target_os = "macos")]
extern crate block;
pub type size_t = ::std::os::raw::c_ulonglong;
extern "C" {
#[link_name = "\u{1}_Z8atexit_bU13block_pointerFvvE"]
pub fn atexit_b(arg1: _bindgen_ty_id_33);
@@ -82,11 +83,16 @@ impl Default for contains_block_pointers {
}
pub type _bindgen_ty_id_33 = *const ::block::Block<(), ()>;
pub type _bindgen_ty_id_40 = *const ::block::Block<
(dispatch_data_t, usize, *const ::std::os::raw::c_void, usize),
(
dispatch_data_t,
size_t,
*const ::std::os::raw::c_void,
size_t,
),
bool,
>;
pub type _bindgen_ty_id_50 = *const ::block::Block<(usize,), ()>;
pub type _bindgen_ty_id_56 = *const ::block::Block<(usize,), ()>;
pub type _bindgen_ty_id_50 = *const ::block::Block<(size_t,), ()>;
pub type _bindgen_ty_id_56 = *const ::block::Block<(size_t,), ()>;
pub type contains_block_pointers__bindgen_ty_id_61 =
*const ::block::Block<(::std::os::raw::c_int,), ()>;
pub type _bindgen_ty_id_68 =
+1
View File
@@ -8,6 +8,7 @@
)]
#![cfg(target_os = "macos")]
pub type size_t = ::std::os::raw::c_ulonglong;
extern "C" {
#[link_name = "\u{1}_Z8atexit_bU13block_pointerFvvE"]
pub fn atexit_b(arg1: *mut ::std::os::raw::c_void);
+2 -1
View File
@@ -7,6 +7,7 @@
non_upper_case_globals
)]
pub type size_t = u64;
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct rte_memseg {
@@ -14,7 +15,7 @@ pub struct rte_memseg {
pub phys_addr: u64,
pub __bindgen_anon_1: rte_memseg__bindgen_ty_1,
///< Length of the segment.
pub len: usize,
pub len: size_t,
///< The pagesize of underlying memory
pub hugepage_sz: u64,
///< NUMA socket ID.
@@ -97,6 +97,7 @@ where
pub const JSVAL_TAG_SHIFT: u32 = 47;
pub const JSVAL_PAYLOAD_MASK: u64 = 140737488355327;
pub const JSVAL_TAG_MASK: i64 = -140737488355328;
pub type size_t = ::std::os::raw::c_ulonglong;
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum JSValueType {
@@ -188,7 +189,7 @@ pub union jsval_layout {
pub s: jsval_layout__bindgen_ty_2,
pub asDouble: f64,
pub asPtr: *mut ::std::os::raw::c_void,
pub asWord: usize,
pub asWord: size_t,
pub asUIntPtr: usize,
_bindgen_union_align: u64,
}
@@ -140,6 +140,7 @@ impl<T> ::std::cmp::Eq for __BindgenUnionField<T> {}
pub const JSVAL_TAG_SHIFT: u32 = 47;
pub const JSVAL_PAYLOAD_MASK: u64 = 140737488355327;
pub const JSVAL_TAG_MASK: i64 = -140737488355328;
pub type size_t = ::std::os::raw::c_ulonglong;
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum JSValueType {
@@ -231,7 +232,7 @@ pub struct jsval_layout {
pub s: __BindgenUnionField<jsval_layout__bindgen_ty_2>,
pub asDouble: __BindgenUnionField<f64>,
pub asPtr: __BindgenUnionField<*mut ::std::os::raw::c_void>,
pub asWord: __BindgenUnionField<usize>,
pub asWord: __BindgenUnionField<size_t>,
pub asUIntPtr: __BindgenUnionField<usize>,
pub bindgen_union_field: u64,
}
+2 -1
View File
@@ -11,6 +11,7 @@ pub const RTE_CACHE_LINE_SIZE: u32 = 64;
pub const RTE_MEMPOOL_OPS_NAMESIZE: u32 = 32;
pub const RTE_MEMPOOL_MAX_OPS_IDX: u32 = 16;
pub const RTE_HEAP_NUM_FREELISTS: u32 = 13;
pub type size_t = ::std::os::raw::c_longlong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rte_mempool {
@@ -292,7 +293,7 @@ pub struct malloc_heap {
pub lock: rte_spinlock_t,
pub free_head: [malloc_heap__bindgen_ty_1; 13usize],
pub alloc_count: ::std::os::raw::c_uint,
pub total_size: usize,
pub total_size: size_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+2 -1
View File
@@ -7,10 +7,11 @@
non_upper_case_globals
)]
pub type size_t = ::std::os::raw::c_ulonglong;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct A {
pub foo: usize,
pub foo: size_t,
}
#[test]
fn bindgen_test_layout_A() {
@@ -7,6 +7,7 @@
non_upper_case_globals
)]
pub type size_t = ::std::os::raw::c_ulonglong;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct nsBaseHashtableET {