| /* automatically generated by rust-bindgen */ |
| |
| |
| #![allow(non_snake_case)] |
| |
| |
| #[repr(C)] |
| #[derive(Debug, Default, Copy)] |
| pub struct Test { |
| pub foo: ::std::os::raw::c_int, |
| pub bar: f32, |
| } |
| pub const Test_T_NONE: Test__bindgen_ty_1 = Test__bindgen_ty_1::T_NONE; |
| #[repr(u32)] |
| #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] |
| pub enum Test__bindgen_ty_1 { T_NONE = 0, } |
| #[test] |
| fn bindgen_test_layout_Test() { |
| assert_eq!(::std::mem::size_of::<Test>() , 8usize , concat ! ( |
| "Size of: " , stringify ! ( Test ) )); |
| assert_eq! (::std::mem::align_of::<Test>() , 4usize , concat ! ( |
| "Alignment of " , stringify ! ( Test ) )); |
| assert_eq! (unsafe { |
| & ( * ( 0 as * const Test ) ) . foo as * const _ as usize } , |
| 0usize , concat ! ( |
| "Alignment of field: " , stringify ! ( Test ) , "::" , |
| stringify ! ( foo ) )); |
| assert_eq! (unsafe { |
| & ( * ( 0 as * const Test ) ) . bar as * const _ as usize } , |
| 4usize , concat ! ( |
| "Alignment of field: " , stringify ! ( Test ) , "::" , |
| stringify ! ( bar ) )); |
| } |
| impl Clone for Test { |
| fn clone(&self) -> Self { *self } |
| } |
| pub const Foo: _bindgen_ty_1 = _bindgen_ty_1::Foo; |
| pub const Bar: _bindgen_ty_1 = _bindgen_ty_1::Bar; |
| #[repr(u32)] |
| #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] |
| pub enum _bindgen_ty_1 { Foo = 0, Bar = 1, } |
| pub use self::_bindgen_ty_1 as Baz; |