/
blocks-signature.rs
101 lines (100 loc) · 2.87 KB
/
blocks-signature.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#![allow(
dead_code,
non_snake_case,
non_camel_case_types,
non_upper_case_globals
)]
#![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);
}
pub type dispatch_data_t = *mut ::std::os::raw::c_void;
pub type dispatch_data_applier_t = _bindgen_ty_id_40;
extern "C" {
#[link_name = "\u{1}_Z19dispatch_data_applyPvU13block_pointerFbS_yPKvyE"]
pub fn dispatch_data_apply(
data: dispatch_data_t,
applier: dispatch_data_applier_t,
) -> bool;
}
extern "C" {
#[link_name = "\u{1}_Z3fooU13block_pointerFvyE"]
pub fn foo(arg1: _bindgen_ty_id_50) -> bool;
}
extern "C" {
#[link_name = "\u{1}_Z7foo_ptrPU13block_pointerFvyE"]
pub fn foo_ptr(arg1: *mut _bindgen_ty_id_56) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct contains_block_pointers {
pub val: contains_block_pointers__bindgen_ty_id_61,
pub ptr_val: *mut _bindgen_ty_id_68,
}
#[test]
fn bindgen_test_layout_contains_block_pointers() {
assert_eq!(
::std::mem::size_of::<contains_block_pointers>(),
16usize,
concat!("Size of: ", stringify!(contains_block_pointers))
);
assert_eq!(
::std::mem::align_of::<contains_block_pointers>(),
8usize,
concat!("Alignment of ", stringify!(contains_block_pointers))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<contains_block_pointers>())).val as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(contains_block_pointers),
"::",
stringify!(val)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<contains_block_pointers>())).ptr_val
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(contains_block_pointers),
"::",
stringify!(ptr_val)
)
);
}
impl Default for contains_block_pointers {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type _bindgen_ty_id_33 = *const ::block::Block<(), ()>;
pub type _bindgen_ty_id_40 = *const ::block::Block<
(
dispatch_data_t,
size_t,
*const ::std::os::raw::c_void,
size_t,
),
bool,
>;
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 =
*const ::block::Block<(::std::os::raw::c_int,), ()>;