|
1 |
| -/* automatically generated by rust-bindgen */ |
2 |
| - |
3 |
| - |
4 |
| -#![allow(non_snake_case)] |
5 |
| - |
6 |
| - |
7 |
| -#[repr(C)] |
8 |
| -#[derive(Debug, Default, Copy)] |
9 |
| -pub struct A { |
10 |
| - pub member_a: ::std::os::raw::c_int, |
11 |
| -} |
12 |
| -#[repr(C)] |
13 |
| -#[derive(Debug, Default, Copy)] |
14 |
| -pub struct A_B { |
15 |
| - pub member_b: ::std::os::raw::c_int, |
16 |
| -} |
17 |
| -#[test] |
18 |
| -fn bindgen_test_layout_A_B() { |
19 |
| - assert_eq!(::std::mem::size_of::<A_B>() , 4usize , concat ! ( |
20 |
| - "Size of: " , stringify ! ( A_B ) )); |
21 |
| - assert_eq! (::std::mem::align_of::<A_B>() , 4usize , concat ! ( |
22 |
| - "Alignment of " , stringify ! ( A_B ) )); |
23 |
| - assert_eq! (unsafe { |
24 |
| - & ( * ( 0 as * const A_B ) ) . member_b as * const _ as usize |
25 |
| - } , 0usize , concat ! ( |
26 |
| - "Alignment of field: " , stringify ! ( A_B ) , "::" , |
27 |
| - stringify ! ( member_b ) )); |
28 |
| -} |
29 |
| -impl Clone for A_B { |
30 |
| - fn clone(&self) -> Self { *self } |
31 |
| -} |
32 |
| -#[repr(C)] |
33 |
| -#[derive(Debug, Default, Copy)] |
34 |
| -pub struct A_C { |
35 |
| - pub baz: ::std::os::raw::c_int, |
36 |
| -} |
37 |
| -#[test] |
38 |
| -fn bindgen_test_layout_A_C() { |
39 |
| - assert_eq!(::std::mem::size_of::<A_C>() , 4usize , concat ! ( |
40 |
| - "Size of: " , stringify ! ( A_C ) )); |
41 |
| - assert_eq! (::std::mem::align_of::<A_C>() , 4usize , concat ! ( |
42 |
| - "Alignment of " , stringify ! ( A_C ) )); |
43 |
| - assert_eq! (unsafe { |
44 |
| - & ( * ( 0 as * const A_C ) ) . baz as * const _ as usize } , |
45 |
| - 0usize , concat ! ( |
46 |
| - "Alignment of field: " , stringify ! ( A_C ) , "::" , |
47 |
| - stringify ! ( baz ) )); |
48 |
| -} |
49 |
| -impl Clone for A_C { |
50 |
| - fn clone(&self) -> Self { *self } |
51 |
| -} |
52 |
| -#[repr(C)] |
53 |
| -#[derive(Debug, Copy, Clone)] |
54 |
| -pub struct A_D<T> { |
55 |
| - pub foo: T, |
56 |
| - _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, |
57 |
| -} |
58 |
| -impl <T> Default for A_D<T> { |
59 |
| - fn default() -> Self { unsafe { ::std::mem::zeroed() } } |
60 |
| -} |
61 |
| -#[test] |
62 |
| -fn bindgen_test_layout_A() { |
63 |
| - assert_eq!(::std::mem::size_of::<A>() , 4usize , concat ! ( |
64 |
| - "Size of: " , stringify ! ( A ) )); |
65 |
| - assert_eq! (::std::mem::align_of::<A>() , 4usize , concat ! ( |
66 |
| - "Alignment of " , stringify ! ( A ) )); |
67 |
| - assert_eq! (unsafe { |
68 |
| - & ( * ( 0 as * const A ) ) . member_a as * const _ as usize } |
69 |
| - , 0usize , concat ! ( |
70 |
| - "Alignment of field: " , stringify ! ( A ) , "::" , stringify |
71 |
| - ! ( member_a ) )); |
72 |
| -} |
73 |
| -impl Clone for A { |
74 |
| - fn clone(&self) -> Self { *self } |
75 |
| -} |
76 |
| -extern "C" { |
77 |
| - #[link_name = "var"] |
78 |
| - pub static mut var: A_B; |
79 |
| -} |
80 |
| -#[test] |
81 |
| -fn __bindgen_test_layout_A_D_instantiation_16() { |
82 |
| - assert_eq!(::std::mem::size_of::<A_D<::std::os::raw::c_int>>() , 4usize , |
83 |
| - concat ! ( |
84 |
| - "Size of template specialization: " , stringify ! ( |
85 |
| - A_D<::std::os::raw::c_int> ) )); |
86 |
| - assert_eq!(::std::mem::align_of::<A_D<::std::os::raw::c_int>>() , 4usize , |
87 |
| - concat ! ( |
88 |
| - "Alignment of template specialization: " , stringify ! ( |
89 |
| - A_D<::std::os::raw::c_int> ) )); |
90 |
| -} |
91 |
| -extern "C" { |
92 |
| - #[link_name = "baz"] |
93 |
| - pub static mut baz: A_D<::std::os::raw::c_int>; |
94 |
| -} |
95 |
| -#[repr(C)] |
96 |
| -#[derive(Debug, Default, Copy)] |
97 |
| -pub struct D { |
98 |
| - pub member: A_B, |
99 |
| -} |
100 |
| -#[test] |
101 |
| -fn bindgen_test_layout_D() { |
102 |
| - assert_eq!(::std::mem::size_of::<D>() , 4usize , concat ! ( |
103 |
| - "Size of: " , stringify ! ( D ) )); |
104 |
| - assert_eq! (::std::mem::align_of::<D>() , 4usize , concat ! ( |
105 |
| - "Alignment of " , stringify ! ( D ) )); |
106 |
| - assert_eq! (unsafe { |
107 |
| - & ( * ( 0 as * const D ) ) . member as * const _ as usize } , |
108 |
| - 0usize , concat ! ( |
109 |
| - "Alignment of field: " , stringify ! ( D ) , "::" , stringify |
110 |
| - ! ( member ) )); |
111 |
| -} |
112 |
| -impl Clone for D { |
113 |
| - fn clone(&self) -> Self { *self } |
114 |
| -} |
115 |
| -#[repr(C)] |
116 |
| -#[derive(Debug, Copy, Clone)] |
117 |
| -pub struct Templated<T> { |
118 |
| - pub member: T, |
119 |
| - _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, |
120 |
| -} |
121 |
| -#[repr(C)] |
122 |
| -#[derive(Debug, Copy, Clone)] |
123 |
| -pub struct Templated_Templated_inner<T> { |
124 |
| - pub member_ptr: *mut T, |
125 |
| - _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, |
126 |
| -} |
127 |
| -impl <T> Default for Templated_Templated_inner<T> { |
128 |
| - fn default() -> Self { unsafe { ::std::mem::zeroed() } } |
129 |
| -} |
130 |
| -impl <T> Default for Templated<T> { |
131 |
| - fn default() -> Self { unsafe { ::std::mem::zeroed() } } |
132 |
| -} |
| 1 | +/* automatically generated by rust-bindgen */ |
| 2 | + |
| 3 | + |
| 4 | +#![allow(non_snake_case)] |
| 5 | + |
| 6 | + |
| 7 | +#[repr(C)] |
| 8 | +#[derive(Debug, Default, Copy)] |
| 9 | +pub struct A { |
| 10 | + pub member_a: ::std::os::raw::c_int, |
| 11 | +} |
| 12 | +#[repr(C)] |
| 13 | +#[derive(Debug, Default, Copy)] |
| 14 | +pub struct A_B { |
| 15 | + pub member_b: ::std::os::raw::c_int, |
| 16 | +} |
| 17 | +#[test] |
| 18 | +fn bindgen_test_layout_A_B() { |
| 19 | + assert_eq!(::std::mem::size_of::<A_B>() , 4usize , concat ! ( |
| 20 | + "Size of: " , stringify ! ( A_B ) )); |
| 21 | + assert_eq! (::std::mem::align_of::<A_B>() , 4usize , concat ! ( |
| 22 | + "Alignment of " , stringify ! ( A_B ) )); |
| 23 | + assert_eq! (unsafe { |
| 24 | + & ( * ( 0 as * const A_B ) ) . member_b as * const _ as usize |
| 25 | + } , 0usize , concat ! ( |
| 26 | + "Alignment of field: " , stringify ! ( A_B ) , "::" , |
| 27 | + stringify ! ( member_b ) )); |
| 28 | +} |
| 29 | +impl Clone for A_B { |
| 30 | + fn clone(&self) -> Self { *self } |
| 31 | +} |
| 32 | +#[repr(C)] |
| 33 | +#[derive(Debug, Default, Copy)] |
| 34 | +pub struct A_C { |
| 35 | + pub baz: ::std::os::raw::c_int, |
| 36 | +} |
| 37 | +#[test] |
| 38 | +fn bindgen_test_layout_A_C() { |
| 39 | + assert_eq!(::std::mem::size_of::<A_C>() , 4usize , concat ! ( |
| 40 | + "Size of: " , stringify ! ( A_C ) )); |
| 41 | + assert_eq! (::std::mem::align_of::<A_C>() , 4usize , concat ! ( |
| 42 | + "Alignment of " , stringify ! ( A_C ) )); |
| 43 | + assert_eq! (unsafe { |
| 44 | + & ( * ( 0 as * const A_C ) ) . baz as * const _ as usize } , |
| 45 | + 0usize , concat ! ( |
| 46 | + "Alignment of field: " , stringify ! ( A_C ) , "::" , |
| 47 | + stringify ! ( baz ) )); |
| 48 | +} |
| 49 | +impl Clone for A_C { |
| 50 | + fn clone(&self) -> Self { *self } |
| 51 | +} |
| 52 | +#[repr(C)] |
| 53 | +#[derive(Debug, Copy, Clone)] |
| 54 | +pub struct A_D<T> { |
| 55 | + pub foo: T, |
| 56 | + _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, |
| 57 | +} |
| 58 | +impl <T> Default for A_D<T> { |
| 59 | + fn default() -> Self { unsafe { ::std::mem::zeroed() } } |
| 60 | +} |
| 61 | +#[test] |
| 62 | +fn bindgen_test_layout_A() { |
| 63 | + assert_eq!(::std::mem::size_of::<A>() , 4usize , concat ! ( |
| 64 | + "Size of: " , stringify ! ( A ) )); |
| 65 | + assert_eq! (::std::mem::align_of::<A>() , 4usize , concat ! ( |
| 66 | + "Alignment of " , stringify ! ( A ) )); |
| 67 | + assert_eq! (unsafe { |
| 68 | + & ( * ( 0 as * const A ) ) . member_a as * const _ as usize } |
| 69 | + , 0usize , concat ! ( |
| 70 | + "Alignment of field: " , stringify ! ( A ) , "::" , stringify |
| 71 | + ! ( member_a ) )); |
| 72 | +} |
| 73 | +impl Clone for A { |
| 74 | + fn clone(&self) -> Self { *self } |
| 75 | +} |
| 76 | +extern "C" { |
| 77 | + #[link_name = "var"] |
| 78 | + pub static mut var: A_B; |
| 79 | +} |
| 80 | +#[test] |
| 81 | +fn __bindgen_test_layout_A_D_instantiation_16() { |
| 82 | + assert_eq!(::std::mem::size_of::<A_D<::std::os::raw::c_int>>() , 4usize , |
| 83 | + concat ! ( |
| 84 | + "Size of template specialization: " , stringify ! ( |
| 85 | + A_D<::std::os::raw::c_int> ) )); |
| 86 | + assert_eq!(::std::mem::align_of::<A_D<::std::os::raw::c_int>>() , 4usize , |
| 87 | + concat ! ( |
| 88 | + "Alignment of template specialization: " , stringify ! ( |
| 89 | + A_D<::std::os::raw::c_int> ) )); |
| 90 | +} |
| 91 | +extern "C" { |
| 92 | + #[link_name = "baz"] |
| 93 | + pub static mut baz: A_D<::std::os::raw::c_int>; |
| 94 | +} |
| 95 | +#[repr(C)] |
| 96 | +#[derive(Debug, Default, Copy)] |
| 97 | +pub struct D { |
| 98 | + pub member: A_B, |
| 99 | +} |
| 100 | +#[test] |
| 101 | +fn bindgen_test_layout_D() { |
| 102 | + assert_eq!(::std::mem::size_of::<D>() , 4usize , concat ! ( |
| 103 | + "Size of: " , stringify ! ( D ) )); |
| 104 | + assert_eq! (::std::mem::align_of::<D>() , 4usize , concat ! ( |
| 105 | + "Alignment of " , stringify ! ( D ) )); |
| 106 | + assert_eq! (unsafe { |
| 107 | + & ( * ( 0 as * const D ) ) . member as * const _ as usize } , |
| 108 | + 0usize , concat ! ( |
| 109 | + "Alignment of field: " , stringify ! ( D ) , "::" , stringify |
| 110 | + ! ( member ) )); |
| 111 | +} |
| 112 | +impl Clone for D { |
| 113 | + fn clone(&self) -> Self { *self } |
| 114 | +} |
| 115 | +#[repr(C)] |
| 116 | +#[derive(Debug, Copy, Clone)] |
| 117 | +pub struct Templated<T> { |
| 118 | + pub member: T, |
| 119 | + _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, |
| 120 | +} |
| 121 | +#[repr(C)] |
| 122 | +#[derive(Debug, Copy, Clone)] |
| 123 | +pub struct Templated_Templated_inner<T> { |
| 124 | + pub member_ptr: *mut T, |
| 125 | + _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, |
| 126 | +} |
| 127 | +impl <T> Default for Templated_Templated_inner<T> { |
| 128 | + fn default() -> Self { unsafe { ::std::mem::zeroed() } } |
| 129 | +} |
| 130 | +impl <T> Default for Templated<T> { |
| 131 | + fn default() -> Self { unsafe { ::std::mem::zeroed() } } |
| 132 | +} |
0 commit comments