|
4 | 4 | #![allow(non_snake_case)]
|
5 | 5 |
|
6 | 6 |
|
| 7 | +#[derive(PartialEq, Copy, Clone, Hash, Debug, Default)] |
7 | 8 | #[repr(C)]
|
8 |
| -#[derive(Debug, Copy)] |
9 |
| -pub struct Testdouble { |
10 |
| - pub mMember: [f64; 2usize], |
11 |
| -} |
12 |
| -#[test] |
13 |
| -fn bindgen_test_layout_Testdouble() { |
14 |
| - assert_eq!(::std::mem::size_of::<Testdouble>() , 16usize); |
15 |
| - assert_eq!(::std::mem::align_of::<Testdouble>() , 8usize); |
16 |
| -} |
17 |
| -impl Clone for Testdouble { |
18 |
| - fn clone(&self) -> Self { *self } |
19 |
| -} |
20 |
| -#[repr(C)] |
21 |
| -#[derive(Debug, Copy)] |
22 |
| -pub struct TestdoublePtr { |
23 |
| - pub mMember: *mut [f64; 2usize], |
24 |
| -} |
25 |
| -#[test] |
26 |
| -fn bindgen_test_layout_TestdoublePtr() { |
27 |
| - assert_eq!(::std::mem::size_of::<TestdoublePtr>() , 8usize); |
28 |
| - assert_eq!(::std::mem::align_of::<TestdoublePtr>() , 8usize); |
29 |
| -} |
30 |
| -impl Clone for TestdoublePtr { |
31 |
| - fn clone(&self) -> Self { *self } |
| 9 | +pub struct __BindgenComplex<T> { |
| 10 | + pub re: T, |
| 11 | + pub im: T, |
32 | 12 | }
|
33 | 13 | #[repr(C)]
|
34 | 14 | #[derive(Debug, Copy)]
|
35 |
| -pub struct Testfloat { |
36 |
| - pub mMember: [f32; 2usize], |
| 15 | +pub struct TestDouble { |
| 16 | + pub mMember: __BindgenComplex<f64>, |
37 | 17 | }
|
38 | 18 | #[test]
|
39 |
| -fn bindgen_test_layout_Testfloat() { |
40 |
| - assert_eq!(::std::mem::size_of::<Testfloat>() , 8usize); |
41 |
| - assert_eq!(::std::mem::align_of::<Testfloat>() , 4usize); |
| 19 | +fn bindgen_test_layout_TestDouble() { |
| 20 | + assert_eq!(::std::mem::size_of::<TestDouble>() , 16usize); |
| 21 | + assert_eq!(::std::mem::align_of::<TestDouble>() , 8usize); |
42 | 22 | }
|
43 |
| -impl Clone for Testfloat { |
| 23 | +impl Clone for TestDouble { |
44 | 24 | fn clone(&self) -> Self { *self }
|
45 | 25 | }
|
46 | 26 | #[repr(C)]
|
47 | 27 | #[derive(Debug, Copy)]
|
48 |
| -pub struct TestfloatPtr { |
49 |
| - pub mMember: *mut [f32; 2usize], |
| 28 | +pub struct TestDoublePtr { |
| 29 | + pub mMember: *mut __BindgenComplex<f64>, |
50 | 30 | }
|
51 | 31 | #[test]
|
52 |
| -fn bindgen_test_layout_TestfloatPtr() { |
53 |
| - assert_eq!(::std::mem::size_of::<TestfloatPtr>() , 8usize); |
54 |
| - assert_eq!(::std::mem::align_of::<TestfloatPtr>() , 8usize); |
| 32 | +fn bindgen_test_layout_TestDoublePtr() { |
| 33 | + assert_eq!(::std::mem::size_of::<TestDoublePtr>() , 8usize); |
| 34 | + assert_eq!(::std::mem::align_of::<TestDoublePtr>() , 8usize); |
55 | 35 | }
|
56 |
| -impl Clone for TestfloatPtr { |
| 36 | +impl Clone for TestDoublePtr { |
57 | 37 | fn clone(&self) -> Self { *self }
|
58 | 38 | }
|
59 | 39 | #[repr(C)]
|
60 | 40 | #[derive(Debug, Copy)]
|
61 |
| -pub struct Testint { |
62 |
| - pub mMember: [::std::os::raw::c_int; 2usize], |
| 41 | +pub struct TestFloat { |
| 42 | + pub mMember: __BindgenComplex<f32>, |
63 | 43 | }
|
64 | 44 | #[test]
|
65 |
| -fn bindgen_test_layout_Testint() { |
66 |
| - assert_eq!(::std::mem::size_of::<Testint>() , 8usize); |
67 |
| - assert_eq!(::std::mem::align_of::<Testint>() , 4usize); |
| 45 | +fn bindgen_test_layout_TestFloat() { |
| 46 | + assert_eq!(::std::mem::size_of::<TestFloat>() , 8usize); |
| 47 | + assert_eq!(::std::mem::align_of::<TestFloat>() , 4usize); |
68 | 48 | }
|
69 |
| -impl Clone for Testint { |
| 49 | +impl Clone for TestFloat { |
70 | 50 | fn clone(&self) -> Self { *self }
|
71 | 51 | }
|
72 | 52 | #[repr(C)]
|
73 | 53 | #[derive(Debug, Copy)]
|
74 |
| -pub struct TestintPtr { |
75 |
| - pub mMember: *mut [::std::os::raw::c_int; 2usize], |
| 54 | +pub struct TestFloatPtr { |
| 55 | + pub mMember: *mut __BindgenComplex<f32>, |
76 | 56 | }
|
77 | 57 | #[test]
|
78 |
| -fn bindgen_test_layout_TestintPtr() { |
79 |
| - assert_eq!(::std::mem::size_of::<TestintPtr>() , 8usize); |
80 |
| - assert_eq!(::std::mem::align_of::<TestintPtr>() , 8usize); |
| 58 | +fn bindgen_test_layout_TestFloatPtr() { |
| 59 | + assert_eq!(::std::mem::size_of::<TestFloatPtr>() , 8usize); |
| 60 | + assert_eq!(::std::mem::align_of::<TestFloatPtr>() , 8usize); |
81 | 61 | }
|
82 |
| -impl Clone for TestintPtr { |
| 62 | +impl Clone for TestFloatPtr { |
83 | 63 | fn clone(&self) -> Self { *self }
|
84 | 64 | }
|
0 commit comments