From a1784883d1f3e4323d012c7b84bb11258ea0ca17 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 8 Feb 2024 20:11:37 +0900 Subject: [PATCH] Automated generate bindings for aarch64-apple-ios (#24) Co-authored-by: qryxip --- .../src/generated/ios/aarch64/bindings.rs | 3700 +++++++---------- 1 file changed, 1395 insertions(+), 2305 deletions(-) diff --git a/crates/open_jtalk-sys/src/generated/ios/aarch64/bindings.rs b/crates/open_jtalk-sys/src/generated/ios/aarch64/bindings.rs index 3a570c4..8486cb8 100644 --- a/crates/open_jtalk-sys/src/generated/ios/aarch64/bindings.rs +++ b/crates/open_jtalk-sys/src/generated/ios/aarch64/bindings.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.60.1 */ +/* automatically generated by rust-bindgen 0.62.0 */ pub const TRUE: u32 = 1; pub const FALSE: u32 = 0; @@ -27,6 +27,9 @@ pub struct mecab_dictionary_info_t { } #[test] fn bindgen_test_layout_mecab_dictionary_info_t() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 48usize, @@ -37,142 +40,86 @@ fn bindgen_test_layout_mecab_dictionary_info_t() { 8usize, concat!("Alignment of ", stringify!(mecab_dictionary_info_t)) ); - fn test_field_filename() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).filename) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(mecab_dictionary_info_t), - "::", - stringify!(filename) - ) - ); - } - test_field_filename(); - fn test_field_charset() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).charset) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(mecab_dictionary_info_t), - "::", - stringify!(charset) - ) - ); - } - test_field_charset(); - fn test_field_size() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(mecab_dictionary_info_t), - "::", - stringify!(size) - ) - ); - } - test_field_size(); - fn test_field_type() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(mecab_dictionary_info_t), - "::", - stringify!(type_) - ) - ); - } - test_field_type(); - fn test_field_lsize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).lsize) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(mecab_dictionary_info_t), - "::", - stringify!(lsize) - ) - ); - } - test_field_lsize(); - fn test_field_rsize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).rsize) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(mecab_dictionary_info_t), - "::", - stringify!(rsize) - ) - ); - } - test_field_rsize(); - fn test_field_version() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(mecab_dictionary_info_t), - "::", - stringify!(version) - ) - ); - } - test_field_version(); - fn test_field_next() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(mecab_dictionary_info_t), - "::", - stringify!(next) - ) - ); - } - test_field_next(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).filename) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mecab_dictionary_info_t), + "::", + stringify!(filename) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).charset) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mecab_dictionary_info_t), + "::", + stringify!(charset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(mecab_dictionary_info_t), + "::", + stringify!(size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(mecab_dictionary_info_t), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lsize) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(mecab_dictionary_info_t), + "::", + stringify!(lsize) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsize) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(mecab_dictionary_info_t), + "::", + stringify!(rsize) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(mecab_dictionary_info_t), + "::", + stringify!(version) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(mecab_dictionary_info_t), + "::", + stringify!(next) + ) + ); } #[doc = " Path structure"] #[repr(C)] @@ -193,6 +140,8 @@ pub struct mecab_path_t { } #[test] fn bindgen_test_layout_mecab_path_t() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -203,108 +152,66 @@ fn bindgen_test_layout_mecab_path_t() { 8usize, concat!("Alignment of ", stringify!(mecab_path_t)) ); - fn test_field_rnode() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).rnode) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(mecab_path_t), - "::", - stringify!(rnode) - ) - ); - } - test_field_rnode(); - fn test_field_rnext() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).rnext) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(mecab_path_t), - "::", - stringify!(rnext) - ) - ); - } - test_field_rnext(); - fn test_field_lnode() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).lnode) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(mecab_path_t), - "::", - stringify!(lnode) - ) - ); - } - test_field_lnode(); - fn test_field_lnext() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).lnext) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(mecab_path_t), - "::", - stringify!(lnext) - ) - ); - } - test_field_lnext(); - fn test_field_cost() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cost) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(mecab_path_t), - "::", - stringify!(cost) - ) - ); - } - test_field_cost(); - fn test_field_prob() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).prob) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(mecab_path_t), - "::", - stringify!(prob) - ) - ); - } - test_field_prob(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rnode) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mecab_path_t), + "::", + stringify!(rnode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rnext) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mecab_path_t), + "::", + stringify!(rnext) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lnode) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(mecab_path_t), + "::", + stringify!(lnode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lnext) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(mecab_path_t), + "::", + stringify!(lnext) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cost) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(mecab_path_t), + "::", + stringify!(cost) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).prob) as usize - ptr as usize }, + 36usize, + concat!( + "Offset of field: ", + stringify!(mecab_path_t), + "::", + stringify!(prob) + ) + ); } #[doc = " Node structure"] #[repr(C)] @@ -365,6 +272,8 @@ pub struct mecab_node_t { } #[test] fn bindgen_test_layout_mecab_node_t() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 112usize, @@ -375,380 +284,226 @@ fn bindgen_test_layout_mecab_node_t() { 8usize, concat!("Alignment of ", stringify!(mecab_node_t)) ); - fn test_field_prev() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(prev) - ) - ); - } - test_field_prev(); - fn test_field_next() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(next) - ) - ); - } - test_field_next(); - fn test_field_enext() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).enext) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(enext) - ) - ); - } - test_field_enext(); - fn test_field_bnext() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).bnext) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(bnext) - ) - ); - } - test_field_bnext(); - fn test_field_rpath() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).rpath) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(rpath) - ) - ); - } - test_field_rpath(); - fn test_field_lpath() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).lpath) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(lpath) - ) - ); - } - test_field_lpath(); - fn test_field_surface() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).surface) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(surface) - ) - ); - } - test_field_surface(); - fn test_field_feature() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).feature) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(feature) - ) - ); - } - test_field_feature(); - fn test_field_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(id) - ) - ); - } - test_field_id(); - fn test_field_length() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize - }, - 68usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(length) - ) - ); - } - test_field_length(); - fn test_field_rlength() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).rlength) as usize - ptr as usize - }, - 70usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(rlength) - ) - ); - } - test_field_rlength(); - fn test_field_rcAttr() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).rcAttr) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(rcAttr) - ) - ); - } - test_field_rcAttr(); - fn test_field_lcAttr() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).lcAttr) as usize - ptr as usize - }, - 74usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(lcAttr) - ) - ); - } - test_field_lcAttr(); - fn test_field_posid() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).posid) as usize - ptr as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(posid) - ) - ); - } - test_field_posid(); - fn test_field_char_type() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).char_type) as usize - ptr as usize - }, - 78usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(char_type) - ) - ); - } - test_field_char_type(); - fn test_field_stat() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).stat) as usize - ptr as usize - }, - 79usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(stat) - ) - ); - } - test_field_stat(); - fn test_field_isbest() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).isbest) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(isbest) - ) - ); - } - test_field_isbest(); - fn test_field_alpha() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).alpha) as usize - ptr as usize - }, - 84usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(alpha) - ) - ); - } - test_field_alpha(); - fn test_field_beta() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).beta) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(beta) - ) - ); - } - test_field_beta(); - fn test_field_prob() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).prob) as usize - ptr as usize - }, - 92usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(prob) - ) - ); - } - test_field_prob(); - fn test_field_wcost() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).wcost) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(wcost) - ) - ); - } - test_field_wcost(); - fn test_field_cost() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cost) as usize - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(mecab_node_t), - "::", - stringify!(cost) - ) - ); - } - test_field_cost(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(prev) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(next) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).enext) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(enext) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bnext) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(bnext) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rpath) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(rpath) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lpath) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(lpath) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).surface) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(surface) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).feature) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(feature) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, + 68usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(length) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rlength) as usize - ptr as usize }, + 70usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(rlength) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rcAttr) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(rcAttr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lcAttr) as usize - ptr as usize }, + 74usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(lcAttr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).posid) as usize - ptr as usize }, + 76usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(posid) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).char_type) as usize - ptr as usize }, + 78usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(char_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).stat) as usize - ptr as usize }, + 79usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(stat) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).isbest) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(isbest) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).alpha) as usize - ptr as usize }, + 84usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(alpha) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).beta) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(beta) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).prob) as usize - ptr as usize }, + 92usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(prob) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).wcost) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(wcost) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cost) as usize - ptr as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(mecab_node_t), + "::", + stringify!(cost) + ) + ); } pub const MECAB_NOR_NODE: _bindgen_ty_1 = _bindgen_ty_1::MECAB_NOR_NODE; pub const MECAB_UNK_NODE: _bindgen_ty_1 = _bindgen_ty_1::MECAB_UNK_NODE; @@ -832,7 +587,6 @@ pub enum _bindgen_ty_4 { MECAB_INSIDE_TOKEN = 2, } pub type __int64_t = ::std::os::raw::c_longlong; -pub type __darwin_size_t = ::std::os::raw::c_ulong; pub type __darwin_off_t = __int64_t; pub type fpos_t = __darwin_off_t; #[repr(C)] @@ -843,6 +597,8 @@ pub struct __sbuf { } #[test] fn bindgen_test_layout___sbuf() { + const UNINIT: ::std::mem::MaybeUninit<__sbuf> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__sbuf>(), 16usize, @@ -853,40 +609,26 @@ fn bindgen_test_layout___sbuf() { 8usize, concat!("Alignment of ", stringify!(__sbuf)) ); - fn test_field__base() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sbuf>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._base) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sbuf), - "::", - stringify!(_base) - ) - ); - } - test_field__base(); - fn test_field__size() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sbuf>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._size) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sbuf), - "::", - stringify!(_size) - ) - ); - } - test_field__size(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._base) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__sbuf), + "::", + stringify!(_base) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._size) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(__sbuf), + "::", + stringify!(_size) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -939,6 +681,8 @@ pub struct __sFILE { } #[test] fn bindgen_test_layout___sFILE() { + const UNINIT: ::std::mem::MaybeUninit<__sFILE> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__sFILE>(), 152usize, @@ -949,346 +693,206 @@ fn bindgen_test_layout___sFILE() { 8usize, concat!("Alignment of ", stringify!(__sFILE)) ); - fn test_field__p() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._p) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_p) - ) - ); - } - test_field__p(); - fn test_field__r() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._r) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_r) - ) - ); - } - test_field__r(); - fn test_field__w() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._w) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_w) - ) - ); - } - test_field__w(); - fn test_field__flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_flags) - ) - ); - } - test_field__flags(); - fn test_field__file() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._file) as usize - ptr as usize - }, - 18usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_file) - ) - ); - } - test_field__file(); - fn test_field__bf() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._bf) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_bf) - ) - ); - } - test_field__bf(); - fn test_field__lbfsize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._lbfsize) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_lbfsize) - ) - ); - } - test_field__lbfsize(); - fn test_field__cookie() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._cookie) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_cookie) - ) - ); - } - test_field__cookie(); - fn test_field__close() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._close) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_close) - ) - ); - } - test_field__close(); - fn test_field__read() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._read) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_read) - ) - ); - } - test_field__read(); - fn test_field__seek() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._seek) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_seek) - ) - ); - } - test_field__seek(); - fn test_field__write() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._write) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_write) - ) - ); - } - test_field__write(); - fn test_field__ub() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._ub) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_ub) - ) - ); - } - test_field__ub(); - fn test_field__extra() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._extra) as usize - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_extra) - ) - ); - } - test_field__extra(); - fn test_field__ur() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._ur) as usize - ptr as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_ur) - ) - ); - } - test_field__ur(); - fn test_field__ubuf() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._ubuf) as usize - ptr as usize - }, - 116usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_ubuf) - ) - ); - } - test_field__ubuf(); - fn test_field__nbuf() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._nbuf) as usize - ptr as usize - }, - 119usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_nbuf) - ) - ); - } - test_field__nbuf(); - fn test_field__lb() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._lb) as usize - ptr as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_lb) - ) - ); - } - test_field__lb(); - fn test_field__blksize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._blksize) as usize - ptr as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_blksize) - ) - ); - } - test_field__blksize(); - fn test_field__offset() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<__sFILE>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr)._offset) as usize - ptr as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_offset) - ) - ); - } - test_field__offset(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._p) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_p) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._r) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_r) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._w) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_w) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._file) as usize - ptr as usize }, + 18usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_file) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._bf) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_bf) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._lbfsize) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_lbfsize) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._cookie) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_cookie) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._close) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_close) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._read) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_read) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._seek) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_seek) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._write) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_write) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._ub) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_ub) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._extra) as usize - ptr as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_extra) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._ur) as usize - ptr as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_ur) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._ubuf) as usize - ptr as usize }, + 116usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_ubuf) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._nbuf) as usize - ptr as usize }, + 119usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_nbuf) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._lb) as usize - ptr as usize }, + 120usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_lb) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._blksize) as usize - ptr as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_blksize) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._offset) as usize - ptr as usize }, + 144usize, + concat!( + "Offset of field: ", + stringify!(__sFILE), + "::", + stringify!(_offset) + ) + ); } pub type FILE = __sFILE; #[repr(C)] @@ -1811,7 +1415,7 @@ extern "C" { impl MeCab_Lattice { #[inline] pub unsafe fn create() -> *mut MeCab_Lattice { - MeCab_Lattice_create() + unsafe { MeCab_Lattice_create() } } } #[repr(C)] @@ -1867,18 +1471,18 @@ extern "C" { impl MeCab_Model { #[inline] pub unsafe fn version() -> *const ::std::os::raw::c_char { - MeCab_Model_version() + unsafe { MeCab_Model_version() } } #[inline] pub unsafe fn create( argc: ::std::os::raw::c_int, argv: *mut *mut ::std::os::raw::c_char, ) -> *mut MeCab_Model { - MeCab_Model_create(argc, argv) + unsafe { MeCab_Model_create(argc, argv) } } #[inline] pub unsafe fn create1(arg: *const ::std::os::raw::c_char) -> *mut MeCab_Model { - MeCab_Model_create1(arg) + unsafe { MeCab_Model_create1(arg) } } } #[repr(C)] @@ -1948,22 +1552,22 @@ extern "C" { impl MeCab_Tagger { #[inline] pub unsafe fn parse(model: *const MeCab_Model, lattice: *mut MeCab_Lattice) -> bool { - MeCab_Tagger_parse(model, lattice) + unsafe { MeCab_Tagger_parse(model, lattice) } } #[inline] pub unsafe fn create( argc: ::std::os::raw::c_int, argv: *mut *mut ::std::os::raw::c_char, ) -> *mut MeCab_Tagger { - MeCab_Tagger_create(argc, argv) + unsafe { MeCab_Tagger_create(argc, argv) } } #[inline] pub unsafe fn create1(arg: *const ::std::os::raw::c_char) -> *mut MeCab_Tagger { - MeCab_Tagger_create1(arg) + unsafe { MeCab_Tagger_create1(arg) } } #[inline] pub unsafe fn version() -> *const ::std::os::raw::c_char { - MeCab_Tagger_version() + unsafe { MeCab_Tagger_version() } } } extern "C" { @@ -2045,6 +1649,8 @@ pub struct _Mecab { } #[test] fn bindgen_test_layout__Mecab() { + const UNINIT: ::std::mem::MaybeUninit<_Mecab> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_Mecab>(), 40usize, @@ -2055,91 +1661,56 @@ fn bindgen_test_layout__Mecab() { 8usize, concat!("Alignment of ", stringify!(_Mecab)) ); - fn test_field_feature() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_Mecab>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).feature) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_Mecab), - "::", - stringify!(feature) - ) - ); - } - test_field_feature(); - fn test_field_size() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_Mecab>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_Mecab), - "::", - stringify!(size) - ) - ); - } - test_field_size(); - fn test_field_model() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_Mecab>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).model) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_Mecab), - "::", - stringify!(model) - ) - ); - } - test_field_model(); - fn test_field_tagger() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_Mecab>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).tagger) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_Mecab), - "::", - stringify!(tagger) - ) - ); - } - test_field_tagger(); - fn test_field_lattice() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_Mecab>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).lattice) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_Mecab), - "::", - stringify!(lattice) - ) - ); - } - test_field_lattice(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).feature) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_Mecab), + "::", + stringify!(feature) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_Mecab), + "::", + stringify!(size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).model) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_Mecab), + "::", + stringify!(model) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tagger) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_Mecab), + "::", + stringify!(tagger) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lattice) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_Mecab), + "::", + stringify!(lattice) + ) + ); } pub type Mecab = _Mecab; extern "C" { @@ -2201,6 +1772,8 @@ pub struct _NJDNode { } #[test] fn bindgen_test_layout__NJDNode() { + const UNINIT: ::std::mem::MaybeUninit<_NJDNode> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_NJDNode>(), 120usize, @@ -2211,278 +1784,166 @@ fn bindgen_test_layout__NJDNode() { 8usize, concat!("Alignment of ", stringify!(_NJDNode)) ); - fn test_field_string() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_NJDNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).string) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NJDNode), - "::", - stringify!(string) - ) - ); - } - test_field_string(); - fn test_field_pos() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_NJDNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pos) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_NJDNode), - "::", - stringify!(pos) - ) - ); - } - test_field_pos(); - fn test_field_pos_group1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_NJDNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pos_group1) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_NJDNode), - "::", - stringify!(pos_group1) - ) - ); - } - test_field_pos_group1(); - fn test_field_pos_group2() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_NJDNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pos_group2) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_NJDNode), - "::", - stringify!(pos_group2) - ) - ); - } - test_field_pos_group2(); - fn test_field_pos_group3() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_NJDNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pos_group3) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_NJDNode), - "::", - stringify!(pos_group3) - ) - ); - } - test_field_pos_group3(); - fn test_field_ctype() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_NJDNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).ctype) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_NJDNode), - "::", - stringify!(ctype) - ) - ); - } - test_field_ctype(); - fn test_field_cform() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_NJDNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cform) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_NJDNode), - "::", - stringify!(cform) - ) - ); - } - test_field_cform(); - fn test_field_orig() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_NJDNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).orig) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_NJDNode), - "::", - stringify!(orig) - ) - ); - } - test_field_orig(); - fn test_field_read() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_NJDNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).read) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_NJDNode), - "::", - stringify!(read) - ) - ); - } - test_field_read(); - fn test_field_pron() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_NJDNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pron) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_NJDNode), - "::", - stringify!(pron) - ) - ); - } - test_field_pron(); - fn test_field_acc() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_NJDNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).acc) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_NJDNode), - "::", - stringify!(acc) - ) - ); - } - test_field_acc(); - fn test_field_mora_size() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_NJDNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).mora_size) as usize - ptr as usize - }, - 84usize, - concat!( - "Offset of field: ", - stringify!(_NJDNode), - "::", - stringify!(mora_size) - ) - ); - } - test_field_mora_size(); - fn test_field_chain_rule() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_NJDNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).chain_rule) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_NJDNode), - "::", - stringify!(chain_rule) - ) - ); - } - test_field_chain_rule(); - fn test_field_chain_flag() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_NJDNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).chain_flag) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_NJDNode), - "::", - stringify!(chain_flag) - ) - ); - } - test_field_chain_flag(); - fn test_field_prev() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_NJDNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_NJDNode), - "::", - stringify!(prev) - ) - ); - } - test_field_prev(); - fn test_field_next() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_NJDNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_NJDNode), - "::", - stringify!(next) - ) - ); - } - test_field_next(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).string) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_NJDNode), + "::", + stringify!(string) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pos) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_NJDNode), + "::", + stringify!(pos) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pos_group1) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_NJDNode), + "::", + stringify!(pos_group1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pos_group2) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_NJDNode), + "::", + stringify!(pos_group2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pos_group3) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_NJDNode), + "::", + stringify!(pos_group3) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ctype) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_NJDNode), + "::", + stringify!(ctype) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cform) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_NJDNode), + "::", + stringify!(cform) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).orig) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(_NJDNode), + "::", + stringify!(orig) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).read) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(_NJDNode), + "::", + stringify!(read) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pron) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(_NJDNode), + "::", + stringify!(pron) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).acc) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(_NJDNode), + "::", + stringify!(acc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mora_size) as usize - ptr as usize }, + 84usize, + concat!( + "Offset of field: ", + stringify!(_NJDNode), + "::", + stringify!(mora_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chain_rule) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(_NJDNode), + "::", + stringify!(chain_rule) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chain_flag) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(_NJDNode), + "::", + stringify!(chain_flag) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(_NJDNode), + "::", + stringify!(prev) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(_NJDNode), + "::", + stringify!(next) + ) + ); } pub type NJDNode = _NJDNode; extern "C" { @@ -2627,6 +2088,8 @@ pub struct _NJD { } #[test] fn bindgen_test_layout__NJD() { + const UNINIT: ::std::mem::MaybeUninit<_NJD> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_NJD>(), 16usize, @@ -2637,40 +2100,26 @@ fn bindgen_test_layout__NJD() { 8usize, concat!("Alignment of ", stringify!(_NJD)) ); - fn test_field_head() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_NJD>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NJD), - "::", - stringify!(head) - ) - ); - } - test_field_head(); - fn test_field_tail() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_NJD>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).tail) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_NJD), - "::", - stringify!(tail) - ) - ); - } - test_field_tail(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_NJD), + "::", + stringify!(head) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tail) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_NJD), + "::", + stringify!(tail) + ) + ); } pub type NJD = _NJD; extern "C" { @@ -2723,6 +2172,9 @@ pub struct _JPCommonLabelPhoneme { } #[test] fn bindgen_test_layout__JPCommonLabelPhoneme() { + const UNINIT: ::std::mem::MaybeUninit<_JPCommonLabelPhoneme> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_JPCommonLabelPhoneme>(), 32usize, @@ -2733,74 +2185,46 @@ fn bindgen_test_layout__JPCommonLabelPhoneme() { 8usize, concat!("Alignment of ", stringify!(_JPCommonLabelPhoneme)) ); - fn test_field_phoneme() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelPhoneme>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).phoneme) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelPhoneme), - "::", - stringify!(phoneme) - ) - ); - } - test_field_phoneme(); - fn test_field_prev() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelPhoneme>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelPhoneme), - "::", - stringify!(prev) - ) - ); - } - test_field_prev(); - fn test_field_next() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelPhoneme>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelPhoneme), - "::", - stringify!(next) - ) - ); - } - test_field_next(); - fn test_field_up() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelPhoneme>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).up) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelPhoneme), - "::", - stringify!(up) - ) - ); - } - test_field_up(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).phoneme) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelPhoneme), + "::", + stringify!(phoneme) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelPhoneme), + "::", + stringify!(prev) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelPhoneme), + "::", + stringify!(next) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).up) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelPhoneme), + "::", + stringify!(up) + ) + ); } pub type JPCommonLabelPhoneme = _JPCommonLabelPhoneme; #[repr(C)] @@ -2815,6 +2239,8 @@ pub struct _JPCommonLabelMora { } #[test] fn bindgen_test_layout__JPCommonLabelMora() { + const UNINIT: ::std::mem::MaybeUninit<_JPCommonLabelMora> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_JPCommonLabelMora>(), 48usize, @@ -2825,108 +2251,66 @@ fn bindgen_test_layout__JPCommonLabelMora() { 8usize, concat!("Alignment of ", stringify!(_JPCommonLabelMora)) ); - fn test_field_mora() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelMora>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).mora) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelMora), - "::", - stringify!(mora) - ) - ); - } - test_field_mora(); - fn test_field_head() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelMora>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelMora), - "::", - stringify!(head) - ) - ); - } - test_field_head(); - fn test_field_tail() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelMora>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).tail) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelMora), - "::", - stringify!(tail) - ) - ); - } - test_field_tail(); - fn test_field_prev() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelMora>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelMora), - "::", - stringify!(prev) - ) - ); - } - test_field_prev(); - fn test_field_next() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelMora>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelMora), - "::", - stringify!(next) - ) - ); - } - test_field_next(); - fn test_field_up() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelMora>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).up) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelMora), - "::", - stringify!(up) - ) - ); - } - test_field_up(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mora) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelMora), + "::", + stringify!(mora) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelMora), + "::", + stringify!(head) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tail) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelMora), + "::", + stringify!(tail) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelMora), + "::", + stringify!(prev) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelMora), + "::", + stringify!(next) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).up) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelMora), + "::", + stringify!(up) + ) + ); } pub type JPCommonLabelMora = _JPCommonLabelMora; #[repr(C)] @@ -2944,6 +2328,8 @@ pub struct _JPCommonLabelWord { } #[test] fn bindgen_test_layout__JPCommonLabelWord() { + const UNINIT: ::std::mem::MaybeUninit<_JPCommonLabelWord> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_JPCommonLabelWord>(), 72usize, @@ -2954,159 +2340,96 @@ fn bindgen_test_layout__JPCommonLabelWord() { 8usize, concat!("Alignment of ", stringify!(_JPCommonLabelWord)) ); - fn test_field_pron() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelWord>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pron) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelWord), - "::", - stringify!(pron) - ) - ); - } - test_field_pron(); - fn test_field_pos() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelWord>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pos) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelWord), - "::", - stringify!(pos) - ) - ); - } - test_field_pos(); - fn test_field_ctype() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelWord>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).ctype) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelWord), - "::", - stringify!(ctype) - ) - ); - } - test_field_ctype(); - fn test_field_cform() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelWord>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cform) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelWord), - "::", - stringify!(cform) - ) - ); - } - test_field_cform(); - fn test_field_head() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelWord>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelWord), - "::", - stringify!(head) - ) - ); - } - test_field_head(); - fn test_field_tail() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelWord>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).tail) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelWord), - "::", - stringify!(tail) - ) - ); - } - test_field_tail(); - fn test_field_prev() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelWord>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelWord), - "::", - stringify!(prev) - ) - ); - } - test_field_prev(); - fn test_field_next() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelWord>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelWord), - "::", - stringify!(next) - ) - ); - } - test_field_next(); - fn test_field_up() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelWord>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).up) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelWord), - "::", - stringify!(up) - ) - ); - } - test_field_up(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pron) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelWord), + "::", + stringify!(pron) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pos) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelWord), + "::", + stringify!(pos) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ctype) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelWord), + "::", + stringify!(ctype) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cform) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelWord), + "::", + stringify!(cform) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelWord), + "::", + stringify!(head) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tail) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelWord), + "::", + stringify!(tail) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelWord), + "::", + stringify!(prev) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelWord), + "::", + stringify!(next) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).up) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelWord), + "::", + stringify!(up) + ) + ); } pub type JPCommonLabelWord = _JPCommonLabelWord; #[repr(C)] @@ -3122,6 +2445,9 @@ pub struct _JPCommonLabelAccentPhrase { } #[test] fn bindgen_test_layout__JPCommonLabelAccentPhrase() { + const UNINIT: ::std::mem::MaybeUninit<_JPCommonLabelAccentPhrase> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_JPCommonLabelAccentPhrase>(), 56usize, @@ -3132,125 +2458,76 @@ fn bindgen_test_layout__JPCommonLabelAccentPhrase() { 8usize, concat!("Alignment of ", stringify!(_JPCommonLabelAccentPhrase)) ); - fn test_field_accent() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelAccentPhrase>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).accent) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelAccentPhrase), - "::", - stringify!(accent) - ) - ); - } - test_field_accent(); - fn test_field_emotion() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelAccentPhrase>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).emotion) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelAccentPhrase), - "::", - stringify!(emotion) - ) - ); - } - test_field_emotion(); - fn test_field_head() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelAccentPhrase>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelAccentPhrase), - "::", - stringify!(head) - ) - ); - } - test_field_head(); - fn test_field_tail() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelAccentPhrase>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).tail) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelAccentPhrase), - "::", - stringify!(tail) - ) - ); - } - test_field_tail(); - fn test_field_prev() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelAccentPhrase>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelAccentPhrase), - "::", - stringify!(prev) - ) - ); - } - test_field_prev(); - fn test_field_next() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelAccentPhrase>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelAccentPhrase), - "::", - stringify!(next) - ) - ); - } - test_field_next(); - fn test_field_up() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelAccentPhrase>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).up) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelAccentPhrase), - "::", - stringify!(up) - ) - ); - } - test_field_up(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).accent) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelAccentPhrase), + "::", + stringify!(accent) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).emotion) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelAccentPhrase), + "::", + stringify!(emotion) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelAccentPhrase), + "::", + stringify!(head) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tail) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelAccentPhrase), + "::", + stringify!(tail) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelAccentPhrase), + "::", + stringify!(prev) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelAccentPhrase), + "::", + stringify!(next) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).up) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelAccentPhrase), + "::", + stringify!(up) + ) + ); } pub type JPCommonLabelAccentPhrase = _JPCommonLabelAccentPhrase; #[repr(C)] @@ -3263,6 +2540,9 @@ pub struct _JPCommonLabelBreathGroup { } #[test] fn bindgen_test_layout__JPCommonLabelBreathGroup() { + const UNINIT: ::std::mem::MaybeUninit<_JPCommonLabelBreathGroup> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_JPCommonLabelBreathGroup>(), 32usize, @@ -3273,74 +2553,46 @@ fn bindgen_test_layout__JPCommonLabelBreathGroup() { 8usize, concat!("Alignment of ", stringify!(_JPCommonLabelBreathGroup)) ); - fn test_field_head() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelBreathGroup>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelBreathGroup), - "::", - stringify!(head) - ) - ); - } - test_field_head(); - fn test_field_tail() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelBreathGroup>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).tail) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelBreathGroup), - "::", - stringify!(tail) - ) - ); - } - test_field_tail(); - fn test_field_prev() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelBreathGroup>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelBreathGroup), - "::", - stringify!(prev) - ) - ); - } - test_field_prev(); - fn test_field_next() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabelBreathGroup>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabelBreathGroup), - "::", - stringify!(next) - ) - ); - } - test_field_next(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelBreathGroup), + "::", + stringify!(head) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tail) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelBreathGroup), + "::", + stringify!(tail) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelBreathGroup), + "::", + stringify!(prev) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabelBreathGroup), + "::", + stringify!(next) + ) + ); } pub type JPCommonLabelBreathGroup = _JPCommonLabelBreathGroup; #[repr(C)] @@ -3362,6 +2614,8 @@ pub struct _JPCommonLabel { } #[test] fn bindgen_test_layout__JPCommonLabel() { + const UNINIT: ::std::mem::MaybeUninit<_JPCommonLabel> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_JPCommonLabel>(), 104usize, @@ -3372,227 +2626,136 @@ fn bindgen_test_layout__JPCommonLabel() { 8usize, concat!("Alignment of ", stringify!(_JPCommonLabel)) ); - fn test_field_size() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabel>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabel), - "::", - stringify!(size) - ) - ); - } - test_field_size(); - fn test_field_feature() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabel>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).feature) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabel), - "::", - stringify!(feature) - ) - ); - } - test_field_feature(); - fn test_field_breath_head() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabel>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).breath_head) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabel), - "::", - stringify!(breath_head) - ) - ); - } - test_field_breath_head(); - fn test_field_breath_tail() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabel>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).breath_tail) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabel), - "::", - stringify!(breath_tail) - ) - ); - } - test_field_breath_tail(); - fn test_field_accent_head() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabel>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).accent_head) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabel), - "::", - stringify!(accent_head) - ) - ); - } - test_field_accent_head(); - fn test_field_accent_tail() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabel>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).accent_tail) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabel), - "::", - stringify!(accent_tail) - ) - ); - } - test_field_accent_tail(); - fn test_field_word_head() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabel>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).word_head) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabel), - "::", - stringify!(word_head) - ) - ); - } - test_field_word_head(); - fn test_field_word_tail() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabel>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).word_tail) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabel), - "::", - stringify!(word_tail) - ) - ); - } - test_field_word_tail(); - fn test_field_mora_head() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabel>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).mora_head) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabel), - "::", - stringify!(mora_head) - ) - ); - } - test_field_mora_head(); - fn test_field_mora_tail() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabel>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).mora_tail) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabel), - "::", - stringify!(mora_tail) - ) - ); - } - test_field_mora_tail(); - fn test_field_phoneme_head() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabel>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).phoneme_head) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabel), - "::", - stringify!(phoneme_head) - ) - ); - } - test_field_phoneme_head(); - fn test_field_phoneme_tail() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabel>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).phoneme_tail) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabel), - "::", - stringify!(phoneme_tail) - ) - ); - } - test_field_phoneme_tail(); - fn test_field_short_pause_flag() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonLabel>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).short_pause_flag) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonLabel), - "::", - stringify!(short_pause_flag) - ) - ); - } - test_field_short_pause_flag(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabel), + "::", + stringify!(size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).feature) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabel), + "::", + stringify!(feature) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).breath_head) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabel), + "::", + stringify!(breath_head) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).breath_tail) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabel), + "::", + stringify!(breath_tail) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).accent_head) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabel), + "::", + stringify!(accent_head) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).accent_tail) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabel), + "::", + stringify!(accent_tail) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).word_head) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabel), + "::", + stringify!(word_head) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).word_tail) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabel), + "::", + stringify!(word_tail) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mora_head) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabel), + "::", + stringify!(mora_head) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mora_tail) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabel), + "::", + stringify!(mora_tail) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).phoneme_head) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabel), + "::", + stringify!(phoneme_head) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).phoneme_tail) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabel), + "::", + stringify!(phoneme_tail) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).short_pause_flag) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonLabel), + "::", + stringify!(short_pause_flag) + ) + ); } pub type JPCommonLabel = _JPCommonLabel; extern "C" { @@ -3642,6 +2805,8 @@ pub struct _JPCommonNode { } #[test] fn bindgen_test_layout__JPCommonNode() { + const UNINIT: ::std::mem::MaybeUninit<_JPCommonNode> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_JPCommonNode>(), 56usize, @@ -3652,142 +2817,86 @@ fn bindgen_test_layout__JPCommonNode() { 8usize, concat!("Alignment of ", stringify!(_JPCommonNode)) ); - fn test_field_pron() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pron) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonNode), - "::", - stringify!(pron) - ) - ); - } - test_field_pron(); - fn test_field_pos() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pos) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonNode), - "::", - stringify!(pos) - ) - ); - } - test_field_pos(); - fn test_field_ctype() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).ctype) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonNode), - "::", - stringify!(ctype) - ) - ); - } - test_field_ctype(); - fn test_field_cform() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cform) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonNode), - "::", - stringify!(cform) - ) - ); - } - test_field_cform(); - fn test_field_acc() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).acc) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonNode), - "::", - stringify!(acc) - ) - ); - } - test_field_acc(); - fn test_field_chain_flag() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).chain_flag) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonNode), - "::", - stringify!(chain_flag) - ) - ); - } - test_field_chain_flag(); - fn test_field_prev() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonNode), - "::", - stringify!(prev) - ) - ); - } - test_field_prev(); - fn test_field_next() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommonNode>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_JPCommonNode), - "::", - stringify!(next) - ) - ); - } - test_field_next(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pron) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonNode), + "::", + stringify!(pron) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pos) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonNode), + "::", + stringify!(pos) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ctype) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonNode), + "::", + stringify!(ctype) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cform) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonNode), + "::", + stringify!(cform) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).acc) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonNode), + "::", + stringify!(acc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chain_flag) as usize - ptr as usize }, + 36usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonNode), + "::", + stringify!(chain_flag) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonNode), + "::", + stringify!(prev) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_JPCommonNode), + "::", + stringify!(next) + ) + ); } pub type JPCommonNode = _JPCommonNode; extern "C" { @@ -3847,6 +2956,8 @@ pub struct _JPCommon { } #[test] fn bindgen_test_layout__JPCommon() { + const UNINIT: ::std::mem::MaybeUninit<_JPCommon> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_JPCommon>(), 24usize, @@ -3857,57 +2968,36 @@ fn bindgen_test_layout__JPCommon() { 8usize, concat!("Alignment of ", stringify!(_JPCommon)) ); - fn test_field_head() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommon>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_JPCommon), - "::", - stringify!(head) - ) - ); - } - test_field_head(); - fn test_field_tail() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommon>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).tail) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_JPCommon), - "::", - stringify!(tail) - ) - ); - } - test_field_tail(); - fn test_field_label() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::<_JPCommon>::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).label) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_JPCommon), - "::", - stringify!(label) - ) - ); - } - test_field_label(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_JPCommon), + "::", + stringify!(head) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tail) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_JPCommon), + "::", + stringify!(tail) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).label) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_JPCommon), + "::", + stringify!(label) + ) + ); } pub type JPCommon = _JPCommon; extern "C" {