|
| 1 | +/* automatically generated by rust-bindgen */ |
| 2 | + |
| 3 | + |
| 4 | +#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] |
| 5 | + |
| 6 | + |
| 7 | +/// Pointers can derive hash |
| 8 | +#[repr(C)] |
| 9 | +#[derive(Debug, Copy, Hash)] |
| 10 | +pub struct ConstPtrMutObj { |
| 11 | + pub bar: *const ::std::os::raw::c_int, |
| 12 | +} |
| 13 | +#[test] |
| 14 | +fn bindgen_test_layout_ConstPtrMutObj() { |
| 15 | + assert_eq!(::std::mem::size_of::<ConstPtrMutObj>() , 8usize , concat ! ( |
| 16 | + "Size of: " , stringify ! ( ConstPtrMutObj ) )); |
| 17 | + assert_eq! (::std::mem::align_of::<ConstPtrMutObj>() , 8usize , concat ! ( |
| 18 | + "Alignment of " , stringify ! ( ConstPtrMutObj ) )); |
| 19 | + assert_eq! (unsafe { |
| 20 | + & ( * ( 0 as * const ConstPtrMutObj ) ) . bar as * const _ as |
| 21 | + usize } , 0usize , concat ! ( |
| 22 | + "Alignment of field: " , stringify ! ( ConstPtrMutObj ) , "::" |
| 23 | + , stringify ! ( bar ) )); |
| 24 | +} |
| 25 | +impl Clone for ConstPtrMutObj { |
| 26 | + fn clone(&self) -> Self { *self } |
| 27 | +} |
| 28 | +impl Default for ConstPtrMutObj { |
| 29 | + fn default() -> Self { unsafe { ::std::mem::zeroed() } } |
| 30 | +} |
| 31 | +#[repr(C)] |
| 32 | +#[derive(Debug, Copy, Hash)] |
| 33 | +pub struct MutPtrMutObj { |
| 34 | + pub bar: *mut ::std::os::raw::c_int, |
| 35 | +} |
| 36 | +#[test] |
| 37 | +fn bindgen_test_layout_MutPtrMutObj() { |
| 38 | + assert_eq!(::std::mem::size_of::<MutPtrMutObj>() , 8usize , concat ! ( |
| 39 | + "Size of: " , stringify ! ( MutPtrMutObj ) )); |
| 40 | + assert_eq! (::std::mem::align_of::<MutPtrMutObj>() , 8usize , concat ! ( |
| 41 | + "Alignment of " , stringify ! ( MutPtrMutObj ) )); |
| 42 | + assert_eq! (unsafe { |
| 43 | + & ( * ( 0 as * const MutPtrMutObj ) ) . bar as * const _ as |
| 44 | + usize } , 0usize , concat ! ( |
| 45 | + "Alignment of field: " , stringify ! ( MutPtrMutObj ) , "::" , |
| 46 | + stringify ! ( bar ) )); |
| 47 | +} |
| 48 | +impl Clone for MutPtrMutObj { |
| 49 | + fn clone(&self) -> Self { *self } |
| 50 | +} |
| 51 | +impl Default for MutPtrMutObj { |
| 52 | + fn default() -> Self { unsafe { ::std::mem::zeroed() } } |
| 53 | +} |
| 54 | +#[repr(C)] |
| 55 | +#[derive(Debug, Copy, Hash)] |
| 56 | +pub struct MutPtrConstObj { |
| 57 | + pub bar: *const ::std::os::raw::c_int, |
| 58 | +} |
| 59 | +#[test] |
| 60 | +fn bindgen_test_layout_MutPtrConstObj() { |
| 61 | + assert_eq!(::std::mem::size_of::<MutPtrConstObj>() , 8usize , concat ! ( |
| 62 | + "Size of: " , stringify ! ( MutPtrConstObj ) )); |
| 63 | + assert_eq! (::std::mem::align_of::<MutPtrConstObj>() , 8usize , concat ! ( |
| 64 | + "Alignment of " , stringify ! ( MutPtrConstObj ) )); |
| 65 | + assert_eq! (unsafe { |
| 66 | + & ( * ( 0 as * const MutPtrConstObj ) ) . bar as * const _ as |
| 67 | + usize } , 0usize , concat ! ( |
| 68 | + "Alignment of field: " , stringify ! ( MutPtrConstObj ) , "::" |
| 69 | + , stringify ! ( bar ) )); |
| 70 | +} |
| 71 | +impl Clone for MutPtrConstObj { |
| 72 | + fn clone(&self) -> Self { *self } |
| 73 | +} |
| 74 | +impl Default for MutPtrConstObj { |
| 75 | + fn default() -> Self { unsafe { ::std::mem::zeroed() } } |
| 76 | +} |
| 77 | +#[repr(C)] |
| 78 | +#[derive(Debug, Copy, Hash)] |
| 79 | +pub struct ConstPtrConstObj { |
| 80 | + pub bar: *const ::std::os::raw::c_int, |
| 81 | +} |
| 82 | +#[test] |
| 83 | +fn bindgen_test_layout_ConstPtrConstObj() { |
| 84 | + assert_eq!(::std::mem::size_of::<ConstPtrConstObj>() , 8usize , concat ! ( |
| 85 | + "Size of: " , stringify ! ( ConstPtrConstObj ) )); |
| 86 | + assert_eq! (::std::mem::align_of::<ConstPtrConstObj>() , 8usize , concat ! |
| 87 | + ( "Alignment of " , stringify ! ( ConstPtrConstObj ) )); |
| 88 | + assert_eq! (unsafe { |
| 89 | + & ( * ( 0 as * const ConstPtrConstObj ) ) . bar as * const _ |
| 90 | + as usize } , 0usize , concat ! ( |
| 91 | + "Alignment of field: " , stringify ! ( ConstPtrConstObj ) , |
| 92 | + "::" , stringify ! ( bar ) )); |
| 93 | +} |
| 94 | +impl Clone for ConstPtrConstObj { |
| 95 | + fn clone(&self) -> Self { *self } |
| 96 | +} |
| 97 | +impl Default for ConstPtrConstObj { |
| 98 | + fn default() -> Self { unsafe { ::std::mem::zeroed() } } |
| 99 | +} |
0 commit comments