• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #![allow(
2     dead_code,
3     non_snake_case,
4     non_camel_case_types,
5     non_upper_case_globals
6 )]
7 
8 #[repr(C)]
9 pub struct PureVirtualIFace__bindgen_vtable {
10     pub PureVirtualIFace_Foo: unsafe extern "C" fn(this: *mut PureVirtualIFace),
11     pub PureVirtualIFace_Bar: unsafe extern "C" fn(
12         this: *mut PureVirtualIFace,
13         arg1: ::std::os::raw::c_uint,
14     ),
15 }
16 #[repr(C)]
17 #[derive(Debug, Copy, Clone)]
18 pub struct PureVirtualIFace {
19     pub vtable_: *const PureVirtualIFace__bindgen_vtable,
20 }
21 #[test]
bindgen_test_layout_PureVirtualIFace()22 fn bindgen_test_layout_PureVirtualIFace() {
23     assert_eq!(
24         ::std::mem::size_of::<PureVirtualIFace>(),
25         8usize,
26         concat!("Size of: ", stringify!(PureVirtualIFace))
27     );
28     assert_eq!(
29         ::std::mem::align_of::<PureVirtualIFace>(),
30         8usize,
31         concat!("Alignment of ", stringify!(PureVirtualIFace))
32     );
33 }
34 impl Default for PureVirtualIFace {
default() -> Self35     fn default() -> Self {
36         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
37         unsafe {
38             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
39             s.assume_init()
40         }
41     }
42 }
43 #[repr(C)]
44 pub struct AnotherInterface__bindgen_vtable {
45     pub AnotherInterface_Baz: unsafe extern "C" fn(this: *mut AnotherInterface),
46 }
47 #[repr(C)]
48 #[derive(Debug, Copy, Clone)]
49 pub struct AnotherInterface {
50     pub vtable_: *const AnotherInterface__bindgen_vtable,
51 }
52 #[test]
bindgen_test_layout_AnotherInterface()53 fn bindgen_test_layout_AnotherInterface() {
54     assert_eq!(
55         ::std::mem::size_of::<AnotherInterface>(),
56         8usize,
57         concat!("Size of: ", stringify!(AnotherInterface))
58     );
59     assert_eq!(
60         ::std::mem::align_of::<AnotherInterface>(),
61         8usize,
62         concat!("Alignment of ", stringify!(AnotherInterface))
63     );
64 }
65 impl Default for AnotherInterface {
default() -> Self66     fn default() -> Self {
67         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
68         unsafe {
69             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
70             s.assume_init()
71         }
72     }
73 }
74 #[repr(C)]
75 #[derive(Debug, Copy, Clone)]
76 pub struct Implementation {
77     pub _base: PureVirtualIFace,
78 }
79 #[test]
bindgen_test_layout_Implementation()80 fn bindgen_test_layout_Implementation() {
81     assert_eq!(
82         ::std::mem::size_of::<Implementation>(),
83         8usize,
84         concat!("Size of: ", stringify!(Implementation))
85     );
86     assert_eq!(
87         ::std::mem::align_of::<Implementation>(),
88         8usize,
89         concat!("Alignment of ", stringify!(Implementation))
90     );
91 }
92 impl Default for Implementation {
default() -> Self93     fn default() -> Self {
94         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
95         unsafe {
96             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
97             s.assume_init()
98         }
99     }
100 }
101 #[repr(C)]
102 #[derive(Debug, Copy, Clone)]
103 pub struct DoubleImpl {
104     pub _base: PureVirtualIFace,
105     pub _base_1: AnotherInterface,
106 }
107 #[test]
bindgen_test_layout_DoubleImpl()108 fn bindgen_test_layout_DoubleImpl() {
109     assert_eq!(
110         ::std::mem::size_of::<DoubleImpl>(),
111         16usize,
112         concat!("Size of: ", stringify!(DoubleImpl))
113     );
114     assert_eq!(
115         ::std::mem::align_of::<DoubleImpl>(),
116         8usize,
117         concat!("Alignment of ", stringify!(DoubleImpl))
118     );
119 }
120 impl Default for DoubleImpl {
default() -> Self121     fn default() -> Self {
122         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
123         unsafe {
124             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
125             s.assume_init()
126         }
127     }
128 }
129