• 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 #![cfg(not(test))]
8 
9 #[repr(C)]
10 #[derive(Default, Copy, Clone)]
11 pub struct JNINativeInterface_ {
12     pub GetVersion: ::std::option::Option<
13         unsafe extern "stdcall" fn(
14             env: *mut ::std::os::raw::c_void,
15         ) -> ::std::os::raw::c_int,
16     >,
17     pub __hack: ::std::os::raw::c_ulonglong,
18 }
19 #[test]
bindgen_test_layout_JNINativeInterface_()20 fn bindgen_test_layout_JNINativeInterface_() {
21     const UNINIT: ::std::mem::MaybeUninit<JNINativeInterface_> =
22         ::std::mem::MaybeUninit::uninit();
23     let ptr = UNINIT.as_ptr();
24     assert_eq!(
25         ::std::mem::size_of::<JNINativeInterface_>(),
26         16usize,
27         concat!("Size of: ", stringify!(JNINativeInterface_))
28     );
29     assert_eq!(
30         ::std::mem::align_of::<JNINativeInterface_>(),
31         8usize,
32         concat!("Alignment of ", stringify!(JNINativeInterface_))
33     );
34     assert_eq!(
35         unsafe {
36             ::std::ptr::addr_of!((*ptr).GetVersion) as usize - ptr as usize
37         },
38         0usize,
39         concat!(
40             "Offset of field: ",
41             stringify!(JNINativeInterface_),
42             "::",
43             stringify!(GetVersion)
44         )
45     );
46     assert_eq!(
47         unsafe { ::std::ptr::addr_of!((*ptr).__hack) as usize - ptr as usize },
48         8usize,
49         concat!(
50             "Offset of field: ",
51             stringify!(JNINativeInterface_),
52             "::",
53             stringify!(__hack)
54         )
55     );
56 }
57 extern "stdcall" {
bar()58     pub fn bar();
59 }
60