diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 60ee5b04..f0ceb847 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -196,24 +196,25 @@ jobs: env: RUST_TARGET: ${{ matrix.config.target }} - # Build and emit bindings to './generated_bindings' - - name: Build & Emit bindings - id: build + + # Build & run bindings with layout tests + - name: Run tests + id: test + if: matrix.config.skip-tests != 'true' run: | . ./ci-cargo.ps1 - ci-cargo build -vv --features use-bindgen $(if ($env:RUST_TARGET -ne '') {"--target=$env:RUST_TARGET"} ) -ActionName "Building for target: $env:RUST_TARGET" + ci-cargo test -vv --features use-bindgen,layout_tests $(if ($env:RUST_TARGET -ne '') {"--target=$env:RUST_TARGET"} ) '--' --nocapture -ActionName "Running bindgen tests for target: $env:RUST_TARGET" env: - LIBRSYS_BINDINGS_OUTPUT_PATH: generated_bindings RUST_TARGET: ${{ matrix.config.target }} - # Test the result of previous step - - name: Run tests - id: test - if: matrix.config.skip-tests != 'true' + # Build and emit bindings to './generated_bindings' + - name: Build & Emit bindings + id: build run: | . ./ci-cargo.ps1 - ci-cargo test -vv --features use-bindgen $(if ($env:RUST_TARGET -ne '') {"--target=$env:RUST_TARGET"} ) '--' --nocapture --test-threads=1 -ActionName "Running bindgen tests for target: $env:RUST_TARGET" + ci-cargo build -vv --features use-bindgen $(if ($env:RUST_TARGET -ne '') {"--target=$env:RUST_TARGET"} ) -ActionName "Building for target: $env:RUST_TARGET" env: + LIBRSYS_BINDINGS_OUTPUT_PATH: generated_bindings RUST_TARGET: ${{ matrix.config.target }} - name: Upload generated bindings @@ -230,7 +231,7 @@ jobs: if: matrix.config.skip-tests != 'true' run: | . ./ci-cargo.ps1 - ci-cargo test -vv $(if ($env:RUST_TARGET -ne '') {"--target=$env:RUST_TARGET"} ) '--' --nocapture --test-threads=1 -ActionName "Running tests for target: $env:RUST_TARGET" + ci-cargo test -vv $(if ($env:RUST_TARGET -ne '') {"--target=$env:RUST_TARGET"} ) '--' --nocapture -ActionName "Running tests for target: $env:RUST_TARGET" env: RUST_TARGET: ${{ matrix.config.target }} diff --git a/Cargo.toml b/Cargo.toml index 6cb4f5f9..6efaddf5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,6 +26,8 @@ clang = { version = "2", optional = true, features = ["runtime", "clang_3_7"] } # By default, we use pre-computed bindings that ship with the library. This may fail! # Turn on the 'use-bindgen' feature to generate bindings on the fly for your platform. use-bindgen = ["bindgen", "clang"] +# Enables generation of layout-tests in bindgen +layout_tests = [] [lib] # Some code comments on R's source code might be accidentally treated as Rust's diff --git a/bindings/bindings-linux-aarch64-R4.2.rs b/bindings/bindings-linux-aarch64-R4.2.rs index ca8ff672..75f8b856 100644 --- a/bindings/bindings-linux-aarch64-R4.2.rs +++ b/bindings/bindings-linux-aarch64-R4.2.rs @@ -284,311 +284,6 @@ pub struct _IO_FILE { pub _mode: ::std::os::raw::c_int, pub _unused2: [::std::os::raw::c_char; 20usize], } -#[test] -fn bindgen_test_layout__IO_FILE() { - const UNINIT: ::std::mem::MaybeUninit<_IO_FILE> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_IO_FILE>(), - 216usize, - concat!("Size of: ", stringify!(_IO_FILE)) - ); - assert_eq!( - ::std::mem::align_of::<_IO_FILE>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_FILE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_ptr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_end) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_base) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_base) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_ptr) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_end) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_base) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_end) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_base) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_backup_base) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_backup_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_end) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._markers) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_markers) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._chain) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_chain) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._fileno) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_fileno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._flags2) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._old_offset) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_old_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._cur_column) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_cur_column) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._vtable_offset) as usize - ptr as usize }, - 130usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_vtable_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._shortbuf) as usize - ptr as usize }, - 131usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_shortbuf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._lock) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_lock) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._offset) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._codecvt) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_codecvt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._wide_data) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_wide_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._freeres_list) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_freeres_list) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._freeres_buf) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_freeres_buf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pad5) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad5) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._mode) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._unused2) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_unused2) - ) - ); -} #[doc = ", MAYBE"] pub const Rboolean_FALSE: Rboolean = 0; #[doc = ", MAYBE"] @@ -606,61 +301,6 @@ pub struct R_CMethodDef { pub numArgs: ::std::os::raw::c_int, pub types: *mut R_NativePrimitiveArgType, } -#[test] -fn bindgen_test_layout_R_CMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(R_CMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(numArgs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).types) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(types) - ) - ); -} #[doc = "These are very similar to those in Rdynpriv.h,\nbut we maintain them separately to give us more freedom to do\nsome computations on the internal versions that are derived from\nthese definitions."] pub type R_FortranMethodDef = R_CMethodDef; #[repr(C)] @@ -670,51 +310,6 @@ pub struct R_CallMethodDef { pub fun: DL_FUNC, pub numArgs: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_R_CallMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(numArgs) - ) - ); -} pub type R_ExternalMethodDef = R_CallMethodDef; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -796,91 +391,6 @@ pub struct R_outpstream_st { ::std::option::Option SEXP>, pub OutPersistHookData: SEXP, } -#[test] -fn bindgen_test_layout_R_outpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(R_outpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_outpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookData) - ) - ); -} pub type R_inpstream_t = *mut R_inpstream_st; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -903,142 +413,12 @@ pub struct R_inpstream_st { pub nat2nat_obj: *mut ::std::os::raw::c_void, pub nat2utf8_obj: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_R_inpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(R_inpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_inpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).native_encoding) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(native_encoding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2nat_obj) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2nat_obj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2utf8_obj) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2utf8_obj) - ) - ); -} #[doc = "try to allow some type checking"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct R_hashtab_type { pub cell: SEXP, } -#[test] -fn bindgen_test_layout_R_hashtab_type() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_hashtab_type)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_hashtab_type)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cell) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_hashtab_type), - "::", - stringify!(cell) - ) - ); -} #[doc = "= 0"] pub const SA_TYPE_SA_NORESTORE: SA_TYPE = 0; pub const SA_TYPE_SA_RESTORE: SA_TYPE = 1; @@ -1071,161 +451,6 @@ pub struct structRstart { pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub __bindgen_padding_0: u32, } -#[test] -fn bindgen_test_layout_structRstart() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(structRstart)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(structRstart)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Quiet) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Quiet) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_NoEcho) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_NoEcho) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Interactive) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Interactive) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Verbose) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Verbose) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadSiteFile) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadSiteFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadInitFile) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DebugInitFile) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(DebugInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RestoreAction) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(RestoreAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).SaveAction) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(SaveAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vsize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nsize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_vsize) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_nsize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ppsize) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(ppsize) - ) - ); -} impl structRstart { #[inline] pub fn NoRenviron(&self) -> Rboolean { @@ -1279,31 +504,6 @@ pub type ParseStatus = u32; pub struct R_altrep_class_t { pub ptr: SEXP, } -#[test] -fn bindgen_test_layout_R_altrep_class_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_altrep_class_t), - "::", - stringify!(ptr) - ) - ); -} pub type R_altrep_UnserializeEX_method_t = ::std::option::Option< unsafe extern "C" fn( arg1: SEXP, @@ -1493,161 +693,6 @@ pub struct R_GE_gcontext { #[doc = "Reference to a pattern fill"] pub patternFill: SEXP, } -#[test] -fn bindgen_test_layout_R_GE_gcontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 288usize, - concat!("Size of: ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).col) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(col) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lwd) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lwd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lty) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lend) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lend) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ljoin) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ljoin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lmitre) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lmitre) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cex) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(cex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ps) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lineheight) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lineheight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontface) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontfamily) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontfamily) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).patternFill) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(patternFill) - ) - ); -} pub type pGEcontext = *mut R_GE_gcontext; #[doc = "--------- New (in 1.4.0) device driver structure ---------\n NOTES:\n 1. All locations and dimensions are in device coordinates.\n 2. I found this comment in the doc for dev_Open -- looks nasty\n Any known instances of such a thing happening? Should be\n replaced by a function to query the device for preferred gpars\n settings? (to be called when the device is initialised)\n\n NOTE that it is perfectly acceptable for this\n function to set generic graphics parameters too\n (i.e., override the generic parameter settings\n which GInit sets up) all at the author's own risk\n of course :)\n\n 3. Do we really need dev_StrWidth as well as dev_MetricInfo?\n I can see the difference between the two -- its just a\n question of whether dev_MetricInfo should just return\n what dev_StrWidth would give if font metric information is\n not available. I guess having both allows the developer\n to decide when to ask for which sort of value, and to decide\n what to do when font metric information is not available.\n And why not a dev_StrHeight?\n 4. Should \"ipr\", \"asp\", and \"cra\" be in the device description?\n If not, then where?\n I guess they don't need to be if no device makes use of them.\n On the other hand, they would need to be replaced by a device\n call that R base graphics could use to get enough information\n to figure them out. (e.g., some sort of dpi() function to\n complement the size() function.)"] pub type DevDesc = _DevDesc; @@ -1896,841 +941,6 @@ pub struct _DevDesc { #[doc = "Area for future expansion.\nBy zeroing this, devices are more likely to work if loaded\ninto a later version of R than that they were compiled under."] pub reserved: [::std::os::raw::c_char; 64usize], } -#[test] -fn bindgen_test_layout__DevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_DevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_DevDesc>(), - 648usize, - concat!("Size of: ", stringify!(_DevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_DevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_DevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(bottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipLeft) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipLeft) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipRight) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipRight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipBottom) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipBottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipTop) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipTop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xCharOffset) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(xCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yCharOffset) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yLineBias) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yLineBias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ipr) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(ipr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cra) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cra) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canClip) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canChangeGamma) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canChangeGamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canHAdj) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canHAdj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startps) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startcol) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startcol) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfill) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startlty) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startlty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfont) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfont) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startgamma) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startgamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceSpecific) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseDown) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseDown) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseMove) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseMove) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseUp) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseUp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenKeybd) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenKeybd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenIdle) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenIdle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gettingEvent) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gettingEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).activate) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(activate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).circle) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(circle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clip) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deactivate) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deactivate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).locator) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(locator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metricInfo) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(metricInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newPage) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newPage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polygon) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polygon) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polyline) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polyline) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rect) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(rect) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).path) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(path) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).raster) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(raster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cap) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cap) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidth) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onExit) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(onExit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getEvent) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(getEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newFrameConfirm) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newFrameConfirm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasTextUTF8) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(hasTextUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).textUTF8) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(textUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidthUTF8) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidthUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wantSymbolUTF8) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(wantSymbolUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useRotatedTextInContour) as usize - ptr as usize }, - 420usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useRotatedTextInContour) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventEnv) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventEnv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventHelper) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventHelper) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).holdflush) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(holdflush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparency) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparency) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparentBg) as usize - ptr as usize }, - 452usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparentBg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveRaster) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveRaster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveCapture) as usize - ptr as usize }, - 460usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveCapture) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveLocator) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveLocator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setPattern) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setPattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releasePattern) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releasePattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setClipPath) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseClipPath) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setMask) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseMask) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceVersion) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceClip) as usize - ptr as usize }, - 524usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).defineGroup) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(defineGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useGroup) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseGroup) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stroke) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(stroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fillStroke) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fillStroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(capabilities) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(reserved) - ) - ); -} pub const R_KeyName_knUNKNOWN: R_KeyName = -1; pub const R_KeyName_knLEFT: R_KeyName = 0; pub const R_KeyName_knUP: R_KeyName = 1; @@ -2773,41 +983,6 @@ pub struct GESystemDesc { #[doc = "An array of function pointers, one per graphics system that\n has registered with the graphics engine.\n\n system_Callback is called when the graphics engine wants\n to give a graphics system the chance to play with its\n device-specific information (stored in systemSpecific)\n There are two parameters: an \"event\" to tell the graphics\n system why the graphics engine has called this function,\n and the systemSpecific pointer. The graphics engine\n has to pass the systemSpecific pointer because only\n the graphics engine will know what array index to use."] pub callback: GEcallback, } -#[test] -fn bindgen_test_layout_GESystemDesc() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(GESystemDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GESystemDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).systemSpecific) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(systemSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(callback) - ) - ); -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GEDevDesc { @@ -2832,121 +1007,6 @@ pub struct _GEDevDesc { #[doc = "Is a device appending a path ?"] pub appending: Rboolean, } -#[test] -fn bindgen_test_layout__GEDevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_GEDevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_GEDevDesc>(), - 248usize, - concat!("Size of: ", stringify!(_GEDevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_GEDevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_GEDevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dev) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dev) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayList) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DLlastElt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(DLlastElt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).savedSnapshot) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(savedSnapshot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dirty) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dirty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).recordGraphics) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(recordGraphics) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gesd) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(gesd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ask) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(ask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).appending) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(appending) - ) - ); -} pub type pGEDevDesc = *mut GEDevDesc; #[doc = "-------------------------------------------------------------------\n\n COLOUR CODE is concerned with the internals of R colour representation\n\n From colors.c, used in par.c, grid/src/gpar.c"] pub type rcolor = ::std::os::raw::c_uint; @@ -3018,41 +1078,6 @@ pub struct Rcomplex { pub r: f64, pub i: f64, } -#[test] -fn bindgen_test_layout_Rcomplex() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(Rcomplex)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Rcomplex)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(r) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(i) - ) - ); -} extern "C" { #[doc = "IEEE NaN"] pub static mut R_NaN: f64; diff --git a/bindings/bindings-linux-aarch64-R4.3.rs b/bindings/bindings-linux-aarch64-R4.3.rs index 3c98a0c0..13109071 100644 --- a/bindings/bindings-linux-aarch64-R4.3.rs +++ b/bindings/bindings-linux-aarch64-R4.3.rs @@ -290,311 +290,6 @@ pub struct _IO_FILE { pub _mode: ::std::os::raw::c_int, pub _unused2: [::std::os::raw::c_char; 20usize], } -#[test] -fn bindgen_test_layout__IO_FILE() { - const UNINIT: ::std::mem::MaybeUninit<_IO_FILE> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_IO_FILE>(), - 216usize, - concat!("Size of: ", stringify!(_IO_FILE)) - ); - assert_eq!( - ::std::mem::align_of::<_IO_FILE>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_FILE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_ptr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_end) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_base) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_base) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_ptr) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_end) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_base) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_end) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_base) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_backup_base) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_backup_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_end) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._markers) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_markers) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._chain) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_chain) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._fileno) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_fileno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._flags2) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._old_offset) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_old_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._cur_column) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_cur_column) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._vtable_offset) as usize - ptr as usize }, - 130usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_vtable_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._shortbuf) as usize - ptr as usize }, - 131usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_shortbuf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._lock) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_lock) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._offset) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._codecvt) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_codecvt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._wide_data) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_wide_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._freeres_list) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_freeres_list) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._freeres_buf) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_freeres_buf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pad5) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad5) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._mode) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._unused2) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_unused2) - ) - ); -} #[doc = ", MAYBE"] pub const Rboolean_FALSE: Rboolean = 0; #[doc = ", MAYBE"] @@ -612,61 +307,6 @@ pub struct R_CMethodDef { pub numArgs: ::std::os::raw::c_int, pub types: *mut R_NativePrimitiveArgType, } -#[test] -fn bindgen_test_layout_R_CMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(R_CMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(numArgs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).types) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(types) - ) - ); -} #[doc = "These are very similar to those in Rdynpriv.h,\nbut we maintain them separately to give us more freedom to do\nsome computations on the internal versions that are derived from\nthese definitions."] pub type R_FortranMethodDef = R_CMethodDef; #[repr(C)] @@ -676,51 +316,6 @@ pub struct R_CallMethodDef { pub fun: DL_FUNC, pub numArgs: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_R_CallMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(numArgs) - ) - ); -} pub type R_ExternalMethodDef = R_CallMethodDef; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -802,91 +397,6 @@ pub struct R_outpstream_st { ::std::option::Option SEXP>, pub OutPersistHookData: SEXP, } -#[test] -fn bindgen_test_layout_R_outpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(R_outpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_outpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookData) - ) - ); -} pub type R_inpstream_t = *mut R_inpstream_st; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -909,142 +419,12 @@ pub struct R_inpstream_st { pub nat2nat_obj: *mut ::std::os::raw::c_void, pub nat2utf8_obj: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_R_inpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(R_inpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_inpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).native_encoding) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(native_encoding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2nat_obj) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2nat_obj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2utf8_obj) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2utf8_obj) - ) - ); -} #[doc = "try to allow some type checking"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct R_hashtab_type { pub cell: SEXP, } -#[test] -fn bindgen_test_layout_R_hashtab_type() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_hashtab_type)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_hashtab_type)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cell) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_hashtab_type), - "::", - stringify!(cell) - ) - ); -} #[doc = "= 0"] pub const SA_TYPE_SA_NORESTORE: SA_TYPE = 0; pub const SA_TYPE_SA_RESTORE: SA_TYPE = 1; @@ -1077,161 +457,6 @@ pub struct structRstart { pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub __bindgen_padding_0: u32, } -#[test] -fn bindgen_test_layout_structRstart() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(structRstart)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(structRstart)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Quiet) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Quiet) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_NoEcho) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_NoEcho) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Interactive) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Interactive) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Verbose) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Verbose) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadSiteFile) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadSiteFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadInitFile) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DebugInitFile) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(DebugInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RestoreAction) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(RestoreAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).SaveAction) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(SaveAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vsize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nsize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_vsize) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_nsize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ppsize) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(ppsize) - ) - ); -} impl structRstart { #[inline] pub fn NoRenviron(&self) -> Rboolean { @@ -1285,31 +510,6 @@ pub type ParseStatus = u32; pub struct R_altrep_class_t { pub ptr: SEXP, } -#[test] -fn bindgen_test_layout_R_altrep_class_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_altrep_class_t), - "::", - stringify!(ptr) - ) - ); -} pub type R_altrep_UnserializeEX_method_t = ::std::option::Option< unsafe extern "C" fn( arg1: SEXP, @@ -1503,161 +703,6 @@ pub struct R_GE_gcontext { #[doc = "Reference to a pattern fill"] pub patternFill: SEXP, } -#[test] -fn bindgen_test_layout_R_GE_gcontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 288usize, - concat!("Size of: ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).col) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(col) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lwd) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lwd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lty) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lend) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lend) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ljoin) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ljoin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lmitre) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lmitre) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cex) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(cex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ps) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lineheight) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lineheight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontface) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontfamily) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontfamily) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).patternFill) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(patternFill) - ) - ); -} pub type pGEcontext = *mut R_GE_gcontext; #[doc = "--------- New (in 1.4.0) device driver structure ---------\n NOTES:\n 1. All locations and dimensions are in device coordinates.\n 2. I found this comment in the doc for dev_Open -- looks nasty\n Any known instances of such a thing happening? Should be\n replaced by a function to query the device for preferred gpars\n settings? (to be called when the device is initialised)\n\n NOTE that it is perfectly acceptable for this\n function to set generic graphics parameters too\n (i.e., override the generic parameter settings\n which GInit sets up) all at the author's own risk\n of course :)\n\n 3. Do we really need dev_StrWidth as well as dev_MetricInfo?\n I can see the difference between the two -- its just a\n question of whether dev_MetricInfo should just return\n what dev_StrWidth would give if font metric information is\n not available. I guess having both allows the developer\n to decide when to ask for which sort of value, and to decide\n what to do when font metric information is not available.\n And why not a dev_StrHeight?\n 4. Should \"ipr\", \"asp\", and \"cra\" be in the device description?\n If not, then where?\n I guess they don't need to be if no device makes use of them.\n On the other hand, they would need to be replaced by a device\n call that R base graphics could use to get enough information\n to figure them out. (e.g., some sort of dpi() function to\n complement the size() function.)"] pub type DevDesc = _DevDesc; @@ -1919,851 +964,6 @@ pub struct _DevDesc { #[doc = "Area for future expansion.\nBy zeroing this, devices are more likely to work if loaded\ninto a later version of R than that they were compiled under."] pub reserved: [::std::os::raw::c_char; 64usize], } -#[test] -fn bindgen_test_layout__DevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_DevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_DevDesc>(), - 656usize, - concat!("Size of: ", stringify!(_DevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_DevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_DevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(bottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipLeft) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipLeft) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipRight) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipRight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipBottom) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipBottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipTop) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipTop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xCharOffset) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(xCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yCharOffset) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yLineBias) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yLineBias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ipr) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(ipr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cra) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cra) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canClip) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canChangeGamma) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canChangeGamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canHAdj) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canHAdj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startps) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startcol) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startcol) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfill) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startlty) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startlty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfont) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfont) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startgamma) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startgamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceSpecific) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseDown) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseDown) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseMove) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseMove) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseUp) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseUp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenKeybd) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenKeybd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenIdle) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenIdle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gettingEvent) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gettingEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).activate) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(activate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).circle) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(circle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clip) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deactivate) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deactivate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).locator) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(locator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metricInfo) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(metricInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newPage) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newPage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polygon) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polygon) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polyline) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polyline) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rect) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(rect) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).path) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(path) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).raster) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(raster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cap) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cap) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidth) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onExit) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(onExit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getEvent) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(getEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newFrameConfirm) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newFrameConfirm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasTextUTF8) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(hasTextUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).textUTF8) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(textUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidthUTF8) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidthUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wantSymbolUTF8) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(wantSymbolUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useRotatedTextInContour) as usize - ptr as usize }, - 420usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useRotatedTextInContour) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventEnv) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventEnv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventHelper) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventHelper) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).holdflush) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(holdflush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparency) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparency) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparentBg) as usize - ptr as usize }, - 452usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparentBg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveRaster) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveRaster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveCapture) as usize - ptr as usize }, - 460usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveCapture) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveLocator) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveLocator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setPattern) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setPattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releasePattern) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releasePattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setClipPath) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseClipPath) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setMask) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseMask) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceVersion) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceClip) as usize - ptr as usize }, - 524usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).defineGroup) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(defineGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useGroup) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseGroup) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stroke) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(stroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fillStroke) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fillStroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(capabilities) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).glyph) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(glyph) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(reserved) - ) - ); -} pub const R_KeyName_knUNKNOWN: R_KeyName = -1; pub const R_KeyName_knLEFT: R_KeyName = 0; pub const R_KeyName_knUP: R_KeyName = 1; @@ -2806,41 +1006,6 @@ pub struct GESystemDesc { #[doc = "An array of function pointers, one per graphics system that\n has registered with the graphics engine.\n\n system_Callback is called when the graphics engine wants\n to give a graphics system the chance to play with its\n device-specific information (stored in systemSpecific)\n There are two parameters: an \"event\" to tell the graphics\n system why the graphics engine has called this function,\n and the systemSpecific pointer. The graphics engine\n has to pass the systemSpecific pointer because only\n the graphics engine will know what array index to use."] pub callback: GEcallback, } -#[test] -fn bindgen_test_layout_GESystemDesc() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(GESystemDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GESystemDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).systemSpecific) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(systemSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(callback) - ) - ); -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GEDevDesc { @@ -2865,121 +1030,6 @@ pub struct _GEDevDesc { #[doc = "Is a device appending a path ?"] pub appending: Rboolean, } -#[test] -fn bindgen_test_layout__GEDevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_GEDevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_GEDevDesc>(), - 248usize, - concat!("Size of: ", stringify!(_GEDevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_GEDevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_GEDevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dev) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dev) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayList) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DLlastElt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(DLlastElt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).savedSnapshot) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(savedSnapshot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dirty) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dirty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).recordGraphics) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(recordGraphics) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gesd) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(gesd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ask) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(ask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).appending) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(appending) - ) - ); -} pub type pGEDevDesc = *mut GEDevDesc; #[doc = "-------------------------------------------------------------------\n\n COLOUR CODE is concerned with the internals of R colour representation\n\n From colors.c, used in par.c, grid/src/gpar.c"] pub type rcolor = ::std::os::raw::c_uint; @@ -3051,41 +1101,6 @@ pub struct Rcomplex { pub r: f64, pub i: f64, } -#[test] -fn bindgen_test_layout_Rcomplex() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(Rcomplex)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Rcomplex)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(r) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(i) - ) - ); -} extern "C" { #[doc = "IEEE NaN"] pub static mut R_NaN: f64; diff --git a/bindings/bindings-linux-aarch64-R4.4-devel.rs b/bindings/bindings-linux-aarch64-R4.4-devel.rs index a88c5c55..6b55142c 100644 --- a/bindings/bindings-linux-aarch64-R4.4-devel.rs +++ b/bindings/bindings-linux-aarch64-R4.4-devel.rs @@ -291,311 +291,6 @@ pub struct _IO_FILE { pub _mode: ::std::os::raw::c_int, pub _unused2: [::std::os::raw::c_char; 20usize], } -#[test] -fn bindgen_test_layout__IO_FILE() { - const UNINIT: ::std::mem::MaybeUninit<_IO_FILE> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_IO_FILE>(), - 216usize, - concat!("Size of: ", stringify!(_IO_FILE)) - ); - assert_eq!( - ::std::mem::align_of::<_IO_FILE>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_FILE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_ptr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_end) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_base) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_base) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_ptr) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_end) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_base) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_end) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_base) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_backup_base) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_backup_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_end) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._markers) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_markers) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._chain) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_chain) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._fileno) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_fileno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._flags2) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._old_offset) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_old_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._cur_column) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_cur_column) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._vtable_offset) as usize - ptr as usize }, - 130usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_vtable_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._shortbuf) as usize - ptr as usize }, - 131usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_shortbuf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._lock) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_lock) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._offset) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._codecvt) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_codecvt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._wide_data) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_wide_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._freeres_list) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_freeres_list) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._freeres_buf) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_freeres_buf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pad5) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad5) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._mode) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._unused2) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_unused2) - ) - ); -} #[doc = ", MAYBE"] pub const Rboolean_FALSE: Rboolean = 0; #[doc = ", MAYBE"] @@ -613,61 +308,6 @@ pub struct R_CMethodDef { pub numArgs: ::std::os::raw::c_int, pub types: *mut R_NativePrimitiveArgType, } -#[test] -fn bindgen_test_layout_R_CMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(R_CMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(numArgs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).types) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(types) - ) - ); -} #[doc = "These are very similar to those in Rdynpriv.h,\nbut we maintain them separately to give us more freedom to do\nsome computations on the internal versions that are derived from\nthese definitions."] pub type R_FortranMethodDef = R_CMethodDef; #[repr(C)] @@ -677,51 +317,6 @@ pub struct R_CallMethodDef { pub fun: DL_FUNC, pub numArgs: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_R_CallMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(numArgs) - ) - ); -} pub type R_ExternalMethodDef = R_CallMethodDef; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -803,91 +398,6 @@ pub struct R_outpstream_st { ::std::option::Option SEXP>, pub OutPersistHookData: SEXP, } -#[test] -fn bindgen_test_layout_R_outpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(R_outpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_outpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookData) - ) - ); -} pub type R_inpstream_t = *mut R_inpstream_st; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -910,142 +420,12 @@ pub struct R_inpstream_st { pub nat2nat_obj: *mut ::std::os::raw::c_void, pub nat2utf8_obj: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_R_inpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(R_inpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_inpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).native_encoding) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(native_encoding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2nat_obj) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2nat_obj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2utf8_obj) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2utf8_obj) - ) - ); -} #[doc = "try to allow some type checking"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct R_hashtab_type { pub cell: SEXP, } -#[test] -fn bindgen_test_layout_R_hashtab_type() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_hashtab_type)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_hashtab_type)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cell) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_hashtab_type), - "::", - stringify!(cell) - ) - ); -} #[doc = "= 0"] pub const SA_TYPE_SA_NORESTORE: SA_TYPE = 0; pub const SA_TYPE_SA_RESTORE: SA_TYPE = 1; @@ -1078,171 +458,6 @@ pub struct structRstart { pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub nconnections: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_structRstart() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(structRstart)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(structRstart)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Quiet) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Quiet) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_NoEcho) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_NoEcho) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Interactive) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Interactive) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Verbose) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Verbose) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadSiteFile) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadSiteFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadInitFile) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DebugInitFile) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(DebugInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RestoreAction) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(RestoreAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).SaveAction) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(SaveAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vsize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nsize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_vsize) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_nsize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ppsize) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(ppsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nconnections) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(nconnections) - ) - ); -} impl structRstart { #[inline] pub fn NoRenviron(&self) -> Rboolean { @@ -1296,31 +511,6 @@ pub type ParseStatus = u32; pub struct R_altrep_class_t { pub ptr: SEXP, } -#[test] -fn bindgen_test_layout_R_altrep_class_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_altrep_class_t), - "::", - stringify!(ptr) - ) - ); -} pub type R_altrep_UnserializeEX_method_t = ::std::option::Option< unsafe extern "C" fn( arg1: SEXP, @@ -1514,161 +704,6 @@ pub struct R_GE_gcontext { #[doc = "Reference to a pattern fill"] pub patternFill: SEXP, } -#[test] -fn bindgen_test_layout_R_GE_gcontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 288usize, - concat!("Size of: ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).col) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(col) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lwd) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lwd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lty) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lend) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lend) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ljoin) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ljoin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lmitre) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lmitre) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cex) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(cex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ps) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lineheight) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lineheight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontface) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontfamily) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontfamily) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).patternFill) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(patternFill) - ) - ); -} pub type pGEcontext = *mut R_GE_gcontext; #[doc = "--------- New (in 1.4.0) device driver structure ---------\n NOTES:\n 1. All locations and dimensions are in device coordinates.\n 2. I found this comment in the doc for dev_Open -- looks nasty\n Any known instances of such a thing happening? Should be\n replaced by a function to query the device for preferred gpars\n settings? (to be called when the device is initialised)\n\n NOTE that it is perfectly acceptable for this\n function to set generic graphics parameters too\n (i.e., override the generic parameter settings\n which GInit sets up) all at the author's own risk\n of course :)\n\n 3. Do we really need dev_StrWidth as well as dev_MetricInfo?\n I can see the difference between the two -- its just a\n question of whether dev_MetricInfo should just return\n what dev_StrWidth would give if font metric information is\n not available. I guess having both allows the developer\n to decide when to ask for which sort of value, and to decide\n what to do when font metric information is not available.\n And why not a dev_StrHeight?\n 4. Should \"ipr\", \"asp\", and \"cra\" be in the device description?\n If not, then where?\n I guess they don't need to be if no device makes use of them.\n On the other hand, they would need to be replaced by a device\n call that R base graphics could use to get enough information\n to figure them out. (e.g., some sort of dpi() function to\n complement the size() function.)"] pub type DevDesc = _DevDesc; @@ -1930,851 +965,6 @@ pub struct _DevDesc { #[doc = "Area for future expansion.\nBy zeroing this, devices are more likely to work if loaded\ninto a later version of R than that they were compiled under."] pub reserved: [::std::os::raw::c_char; 64usize], } -#[test] -fn bindgen_test_layout__DevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_DevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_DevDesc>(), - 656usize, - concat!("Size of: ", stringify!(_DevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_DevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_DevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(bottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipLeft) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipLeft) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipRight) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipRight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipBottom) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipBottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipTop) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipTop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xCharOffset) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(xCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yCharOffset) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yLineBias) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yLineBias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ipr) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(ipr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cra) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cra) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canClip) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canChangeGamma) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canChangeGamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canHAdj) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canHAdj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startps) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startcol) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startcol) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfill) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startlty) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startlty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfont) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfont) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startgamma) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startgamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceSpecific) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseDown) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseDown) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseMove) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseMove) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseUp) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseUp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenKeybd) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenKeybd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenIdle) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenIdle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gettingEvent) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gettingEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).activate) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(activate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).circle) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(circle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clip) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deactivate) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deactivate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).locator) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(locator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metricInfo) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(metricInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newPage) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newPage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polygon) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polygon) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polyline) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polyline) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rect) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(rect) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).path) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(path) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).raster) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(raster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cap) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cap) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidth) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onExit) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(onExit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getEvent) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(getEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newFrameConfirm) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newFrameConfirm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasTextUTF8) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(hasTextUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).textUTF8) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(textUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidthUTF8) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidthUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wantSymbolUTF8) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(wantSymbolUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useRotatedTextInContour) as usize - ptr as usize }, - 420usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useRotatedTextInContour) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventEnv) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventEnv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventHelper) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventHelper) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).holdflush) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(holdflush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparency) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparency) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparentBg) as usize - ptr as usize }, - 452usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparentBg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveRaster) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveRaster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveCapture) as usize - ptr as usize }, - 460usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveCapture) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveLocator) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveLocator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setPattern) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setPattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releasePattern) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releasePattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setClipPath) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseClipPath) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setMask) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseMask) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceVersion) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceClip) as usize - ptr as usize }, - 524usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).defineGroup) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(defineGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useGroup) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseGroup) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stroke) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(stroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fillStroke) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fillStroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(capabilities) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).glyph) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(glyph) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(reserved) - ) - ); -} pub const R_KeyName_knUNKNOWN: R_KeyName = -1; pub const R_KeyName_knLEFT: R_KeyName = 0; pub const R_KeyName_knUP: R_KeyName = 1; @@ -2817,41 +1007,6 @@ pub struct GESystemDesc { #[doc = "An array of function pointers, one per graphics system that\n has registered with the graphics engine.\n\n system_Callback is called when the graphics engine wants\n to give a graphics system the chance to play with its\n device-specific information (stored in systemSpecific)\n There are two parameters: an \"event\" to tell the graphics\n system why the graphics engine has called this function,\n and the systemSpecific pointer. The graphics engine\n has to pass the systemSpecific pointer because only\n the graphics engine will know what array index to use."] pub callback: GEcallback, } -#[test] -fn bindgen_test_layout_GESystemDesc() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(GESystemDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GESystemDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).systemSpecific) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(systemSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(callback) - ) - ); -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GEDevDesc { @@ -2876,121 +1031,6 @@ pub struct _GEDevDesc { #[doc = "Is a device appending a path ?"] pub appending: Rboolean, } -#[test] -fn bindgen_test_layout__GEDevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_GEDevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_GEDevDesc>(), - 248usize, - concat!("Size of: ", stringify!(_GEDevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_GEDevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_GEDevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dev) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dev) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayList) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DLlastElt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(DLlastElt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).savedSnapshot) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(savedSnapshot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dirty) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dirty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).recordGraphics) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(recordGraphics) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gesd) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(gesd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ask) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(ask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).appending) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(appending) - ) - ); -} pub type pGEDevDesc = *mut GEDevDesc; #[doc = "-------------------------------------------------------------------\n\n COLOUR CODE is concerned with the internals of R colour representation\n\n From colors.c, used in par.c, grid/src/gpar.c"] pub type rcolor = ::std::os::raw::c_uint; @@ -3062,41 +1102,6 @@ pub struct Rcomplex { pub r: f64, pub i: f64, } -#[test] -fn bindgen_test_layout_Rcomplex() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(Rcomplex)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Rcomplex)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(r) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(i) - ) - ); -} extern "C" { #[doc = "IEEE NaN"] pub static mut R_NaN: f64; diff --git a/bindings/bindings-linux-x86_64-R4.2.rs b/bindings/bindings-linux-x86_64-R4.2.rs index 4563b65f..7cd2a0d7 100644 --- a/bindings/bindings-linux-x86_64-R4.2.rs +++ b/bindings/bindings-linux-x86_64-R4.2.rs @@ -284,311 +284,6 @@ pub struct _IO_FILE { pub _mode: ::std::os::raw::c_int, pub _unused2: [::std::os::raw::c_char; 20usize], } -#[test] -fn bindgen_test_layout__IO_FILE() { - const UNINIT: ::std::mem::MaybeUninit<_IO_FILE> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_IO_FILE>(), - 216usize, - concat!("Size of: ", stringify!(_IO_FILE)) - ); - assert_eq!( - ::std::mem::align_of::<_IO_FILE>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_FILE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_ptr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_end) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_base) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_base) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_ptr) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_end) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_base) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_end) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_base) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_backup_base) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_backup_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_end) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._markers) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_markers) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._chain) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_chain) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._fileno) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_fileno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._flags2) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._old_offset) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_old_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._cur_column) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_cur_column) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._vtable_offset) as usize - ptr as usize }, - 130usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_vtable_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._shortbuf) as usize - ptr as usize }, - 131usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_shortbuf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._lock) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_lock) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._offset) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._codecvt) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_codecvt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._wide_data) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_wide_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._freeres_list) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_freeres_list) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._freeres_buf) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_freeres_buf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pad5) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad5) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._mode) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._unused2) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_unused2) - ) - ); -} #[doc = ", MAYBE"] pub const Rboolean_FALSE: Rboolean = 0; #[doc = ", MAYBE"] @@ -606,61 +301,6 @@ pub struct R_CMethodDef { pub numArgs: ::std::os::raw::c_int, pub types: *mut R_NativePrimitiveArgType, } -#[test] -fn bindgen_test_layout_R_CMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(R_CMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(numArgs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).types) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(types) - ) - ); -} #[doc = "These are very similar to those in Rdynpriv.h,\nbut we maintain them separately to give us more freedom to do\nsome computations on the internal versions that are derived from\nthese definitions."] pub type R_FortranMethodDef = R_CMethodDef; #[repr(C)] @@ -670,51 +310,6 @@ pub struct R_CallMethodDef { pub fun: DL_FUNC, pub numArgs: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_R_CallMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(numArgs) - ) - ); -} pub type R_ExternalMethodDef = R_CallMethodDef; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -796,91 +391,6 @@ pub struct R_outpstream_st { ::std::option::Option SEXP>, pub OutPersistHookData: SEXP, } -#[test] -fn bindgen_test_layout_R_outpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(R_outpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_outpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookData) - ) - ); -} pub type R_inpstream_t = *mut R_inpstream_st; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -903,142 +413,12 @@ pub struct R_inpstream_st { pub nat2nat_obj: *mut ::std::os::raw::c_void, pub nat2utf8_obj: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_R_inpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(R_inpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_inpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).native_encoding) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(native_encoding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2nat_obj) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2nat_obj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2utf8_obj) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2utf8_obj) - ) - ); -} #[doc = "try to allow some type checking"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct R_hashtab_type { pub cell: SEXP, } -#[test] -fn bindgen_test_layout_R_hashtab_type() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_hashtab_type)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_hashtab_type)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cell) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_hashtab_type), - "::", - stringify!(cell) - ) - ); -} #[doc = "= 0"] pub const SA_TYPE_SA_NORESTORE: SA_TYPE = 0; pub const SA_TYPE_SA_RESTORE: SA_TYPE = 1; @@ -1071,161 +451,6 @@ pub struct structRstart { pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub __bindgen_padding_0: u32, } -#[test] -fn bindgen_test_layout_structRstart() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(structRstart)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(structRstart)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Quiet) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Quiet) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_NoEcho) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_NoEcho) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Interactive) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Interactive) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Verbose) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Verbose) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadSiteFile) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadSiteFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadInitFile) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DebugInitFile) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(DebugInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RestoreAction) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(RestoreAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).SaveAction) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(SaveAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vsize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nsize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_vsize) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_nsize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ppsize) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(ppsize) - ) - ); -} impl structRstart { #[inline] pub fn NoRenviron(&self) -> Rboolean { @@ -1279,31 +504,6 @@ pub type ParseStatus = u32; pub struct R_altrep_class_t { pub ptr: SEXP, } -#[test] -fn bindgen_test_layout_R_altrep_class_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_altrep_class_t), - "::", - stringify!(ptr) - ) - ); -} pub type R_altrep_UnserializeEX_method_t = ::std::option::Option< unsafe extern "C" fn( arg1: SEXP, @@ -1493,161 +693,6 @@ pub struct R_GE_gcontext { #[doc = "Reference to a pattern fill"] pub patternFill: SEXP, } -#[test] -fn bindgen_test_layout_R_GE_gcontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 288usize, - concat!("Size of: ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).col) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(col) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lwd) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lwd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lty) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lend) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lend) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ljoin) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ljoin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lmitre) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lmitre) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cex) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(cex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ps) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lineheight) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lineheight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontface) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontfamily) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontfamily) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).patternFill) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(patternFill) - ) - ); -} pub type pGEcontext = *mut R_GE_gcontext; #[doc = "--------- New (in 1.4.0) device driver structure ---------\n NOTES:\n 1. All locations and dimensions are in device coordinates.\n 2. I found this comment in the doc for dev_Open -- looks nasty\n Any known instances of such a thing happening? Should be\n replaced by a function to query the device for preferred gpars\n settings? (to be called when the device is initialised)\n\n NOTE that it is perfectly acceptable for this\n function to set generic graphics parameters too\n (i.e., override the generic parameter settings\n which GInit sets up) all at the author's own risk\n of course :)\n\n 3. Do we really need dev_StrWidth as well as dev_MetricInfo?\n I can see the difference between the two -- its just a\n question of whether dev_MetricInfo should just return\n what dev_StrWidth would give if font metric information is\n not available. I guess having both allows the developer\n to decide when to ask for which sort of value, and to decide\n what to do when font metric information is not available.\n And why not a dev_StrHeight?\n 4. Should \"ipr\", \"asp\", and \"cra\" be in the device description?\n If not, then where?\n I guess they don't need to be if no device makes use of them.\n On the other hand, they would need to be replaced by a device\n call that R base graphics could use to get enough information\n to figure them out. (e.g., some sort of dpi() function to\n complement the size() function.)"] pub type DevDesc = _DevDesc; @@ -1896,841 +941,6 @@ pub struct _DevDesc { #[doc = "Area for future expansion.\nBy zeroing this, devices are more likely to work if loaded\ninto a later version of R than that they were compiled under."] pub reserved: [::std::os::raw::c_char; 64usize], } -#[test] -fn bindgen_test_layout__DevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_DevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_DevDesc>(), - 648usize, - concat!("Size of: ", stringify!(_DevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_DevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_DevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(bottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipLeft) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipLeft) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipRight) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipRight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipBottom) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipBottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipTop) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipTop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xCharOffset) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(xCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yCharOffset) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yLineBias) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yLineBias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ipr) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(ipr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cra) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cra) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canClip) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canChangeGamma) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canChangeGamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canHAdj) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canHAdj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startps) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startcol) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startcol) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfill) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startlty) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startlty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfont) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfont) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startgamma) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startgamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceSpecific) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseDown) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseDown) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseMove) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseMove) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseUp) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseUp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenKeybd) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenKeybd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenIdle) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenIdle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gettingEvent) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gettingEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).activate) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(activate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).circle) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(circle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clip) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deactivate) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deactivate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).locator) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(locator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metricInfo) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(metricInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newPage) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newPage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polygon) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polygon) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polyline) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polyline) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rect) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(rect) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).path) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(path) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).raster) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(raster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cap) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cap) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidth) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onExit) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(onExit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getEvent) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(getEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newFrameConfirm) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newFrameConfirm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasTextUTF8) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(hasTextUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).textUTF8) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(textUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidthUTF8) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidthUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wantSymbolUTF8) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(wantSymbolUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useRotatedTextInContour) as usize - ptr as usize }, - 420usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useRotatedTextInContour) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventEnv) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventEnv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventHelper) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventHelper) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).holdflush) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(holdflush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparency) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparency) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparentBg) as usize - ptr as usize }, - 452usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparentBg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveRaster) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveRaster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveCapture) as usize - ptr as usize }, - 460usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveCapture) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveLocator) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveLocator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setPattern) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setPattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releasePattern) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releasePattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setClipPath) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseClipPath) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setMask) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseMask) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceVersion) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceClip) as usize - ptr as usize }, - 524usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).defineGroup) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(defineGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useGroup) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseGroup) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stroke) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(stroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fillStroke) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fillStroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(capabilities) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(reserved) - ) - ); -} pub const R_KeyName_knUNKNOWN: R_KeyName = -1; pub const R_KeyName_knLEFT: R_KeyName = 0; pub const R_KeyName_knUP: R_KeyName = 1; @@ -2773,41 +983,6 @@ pub struct GESystemDesc { #[doc = "An array of function pointers, one per graphics system that\n has registered with the graphics engine.\n\n system_Callback is called when the graphics engine wants\n to give a graphics system the chance to play with its\n device-specific information (stored in systemSpecific)\n There are two parameters: an \"event\" to tell the graphics\n system why the graphics engine has called this function,\n and the systemSpecific pointer. The graphics engine\n has to pass the systemSpecific pointer because only\n the graphics engine will know what array index to use."] pub callback: GEcallback, } -#[test] -fn bindgen_test_layout_GESystemDesc() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(GESystemDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GESystemDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).systemSpecific) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(systemSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(callback) - ) - ); -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GEDevDesc { @@ -2832,121 +1007,6 @@ pub struct _GEDevDesc { #[doc = "Is a device appending a path ?"] pub appending: Rboolean, } -#[test] -fn bindgen_test_layout__GEDevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_GEDevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_GEDevDesc>(), - 248usize, - concat!("Size of: ", stringify!(_GEDevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_GEDevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_GEDevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dev) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dev) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayList) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DLlastElt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(DLlastElt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).savedSnapshot) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(savedSnapshot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dirty) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dirty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).recordGraphics) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(recordGraphics) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gesd) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(gesd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ask) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(ask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).appending) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(appending) - ) - ); -} pub type pGEDevDesc = *mut GEDevDesc; #[doc = "-------------------------------------------------------------------\n\n COLOUR CODE is concerned with the internals of R colour representation\n\n From colors.c, used in par.c, grid/src/gpar.c"] pub type rcolor = ::std::os::raw::c_uint; @@ -3018,41 +1078,6 @@ pub struct Rcomplex { pub r: f64, pub i: f64, } -#[test] -fn bindgen_test_layout_Rcomplex() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(Rcomplex)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Rcomplex)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(r) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(i) - ) - ); -} pub type __builtin_va_list = [__va_list_tag; 1usize]; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -3062,61 +1087,6 @@ pub struct __va_list_tag { pub overflow_arg_area: *mut ::std::os::raw::c_void, pub reg_save_area: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout___va_list_tag() { - const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} extern "C" { #[doc = "IEEE NaN"] pub static mut R_NaN: f64; diff --git a/bindings/bindings-linux-x86_64-R4.3.rs b/bindings/bindings-linux-x86_64-R4.3.rs index a136b05a..5e38c2a8 100644 --- a/bindings/bindings-linux-x86_64-R4.3.rs +++ b/bindings/bindings-linux-x86_64-R4.3.rs @@ -290,311 +290,6 @@ pub struct _IO_FILE { pub _mode: ::std::os::raw::c_int, pub _unused2: [::std::os::raw::c_char; 20usize], } -#[test] -fn bindgen_test_layout__IO_FILE() { - const UNINIT: ::std::mem::MaybeUninit<_IO_FILE> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_IO_FILE>(), - 216usize, - concat!("Size of: ", stringify!(_IO_FILE)) - ); - assert_eq!( - ::std::mem::align_of::<_IO_FILE>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_FILE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_ptr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_end) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_base) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_base) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_ptr) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_end) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_base) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_end) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_base) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_backup_base) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_backup_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_end) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._markers) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_markers) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._chain) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_chain) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._fileno) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_fileno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._flags2) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._old_offset) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_old_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._cur_column) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_cur_column) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._vtable_offset) as usize - ptr as usize }, - 130usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_vtable_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._shortbuf) as usize - ptr as usize }, - 131usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_shortbuf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._lock) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_lock) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._offset) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._codecvt) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_codecvt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._wide_data) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_wide_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._freeres_list) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_freeres_list) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._freeres_buf) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_freeres_buf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pad5) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad5) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._mode) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._unused2) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_unused2) - ) - ); -} #[doc = ", MAYBE"] pub const Rboolean_FALSE: Rboolean = 0; #[doc = ", MAYBE"] @@ -612,61 +307,6 @@ pub struct R_CMethodDef { pub numArgs: ::std::os::raw::c_int, pub types: *mut R_NativePrimitiveArgType, } -#[test] -fn bindgen_test_layout_R_CMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(R_CMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(numArgs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).types) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(types) - ) - ); -} #[doc = "These are very similar to those in Rdynpriv.h,\nbut we maintain them separately to give us more freedom to do\nsome computations on the internal versions that are derived from\nthese definitions."] pub type R_FortranMethodDef = R_CMethodDef; #[repr(C)] @@ -676,51 +316,6 @@ pub struct R_CallMethodDef { pub fun: DL_FUNC, pub numArgs: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_R_CallMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(numArgs) - ) - ); -} pub type R_ExternalMethodDef = R_CallMethodDef; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -802,91 +397,6 @@ pub struct R_outpstream_st { ::std::option::Option SEXP>, pub OutPersistHookData: SEXP, } -#[test] -fn bindgen_test_layout_R_outpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(R_outpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_outpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookData) - ) - ); -} pub type R_inpstream_t = *mut R_inpstream_st; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -909,142 +419,12 @@ pub struct R_inpstream_st { pub nat2nat_obj: *mut ::std::os::raw::c_void, pub nat2utf8_obj: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_R_inpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(R_inpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_inpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).native_encoding) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(native_encoding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2nat_obj) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2nat_obj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2utf8_obj) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2utf8_obj) - ) - ); -} #[doc = "try to allow some type checking"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct R_hashtab_type { pub cell: SEXP, } -#[test] -fn bindgen_test_layout_R_hashtab_type() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_hashtab_type)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_hashtab_type)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cell) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_hashtab_type), - "::", - stringify!(cell) - ) - ); -} #[doc = "= 0"] pub const SA_TYPE_SA_NORESTORE: SA_TYPE = 0; pub const SA_TYPE_SA_RESTORE: SA_TYPE = 1; @@ -1077,161 +457,6 @@ pub struct structRstart { pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub __bindgen_padding_0: u32, } -#[test] -fn bindgen_test_layout_structRstart() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(structRstart)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(structRstart)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Quiet) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Quiet) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_NoEcho) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_NoEcho) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Interactive) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Interactive) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Verbose) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Verbose) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadSiteFile) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadSiteFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadInitFile) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DebugInitFile) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(DebugInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RestoreAction) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(RestoreAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).SaveAction) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(SaveAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vsize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nsize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_vsize) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_nsize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ppsize) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(ppsize) - ) - ); -} impl structRstart { #[inline] pub fn NoRenviron(&self) -> Rboolean { @@ -1285,31 +510,6 @@ pub type ParseStatus = u32; pub struct R_altrep_class_t { pub ptr: SEXP, } -#[test] -fn bindgen_test_layout_R_altrep_class_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_altrep_class_t), - "::", - stringify!(ptr) - ) - ); -} pub type R_altrep_UnserializeEX_method_t = ::std::option::Option< unsafe extern "C" fn( arg1: SEXP, @@ -1503,161 +703,6 @@ pub struct R_GE_gcontext { #[doc = "Reference to a pattern fill"] pub patternFill: SEXP, } -#[test] -fn bindgen_test_layout_R_GE_gcontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 288usize, - concat!("Size of: ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).col) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(col) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lwd) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lwd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lty) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lend) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lend) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ljoin) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ljoin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lmitre) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lmitre) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cex) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(cex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ps) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lineheight) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lineheight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontface) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontfamily) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontfamily) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).patternFill) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(patternFill) - ) - ); -} pub type pGEcontext = *mut R_GE_gcontext; #[doc = "--------- New (in 1.4.0) device driver structure ---------\n NOTES:\n 1. All locations and dimensions are in device coordinates.\n 2. I found this comment in the doc for dev_Open -- looks nasty\n Any known instances of such a thing happening? Should be\n replaced by a function to query the device for preferred gpars\n settings? (to be called when the device is initialised)\n\n NOTE that it is perfectly acceptable for this\n function to set generic graphics parameters too\n (i.e., override the generic parameter settings\n which GInit sets up) all at the author's own risk\n of course :)\n\n 3. Do we really need dev_StrWidth as well as dev_MetricInfo?\n I can see the difference between the two -- its just a\n question of whether dev_MetricInfo should just return\n what dev_StrWidth would give if font metric information is\n not available. I guess having both allows the developer\n to decide when to ask for which sort of value, and to decide\n what to do when font metric information is not available.\n And why not a dev_StrHeight?\n 4. Should \"ipr\", \"asp\", and \"cra\" be in the device description?\n If not, then where?\n I guess they don't need to be if no device makes use of them.\n On the other hand, they would need to be replaced by a device\n call that R base graphics could use to get enough information\n to figure them out. (e.g., some sort of dpi() function to\n complement the size() function.)"] pub type DevDesc = _DevDesc; @@ -1919,851 +964,6 @@ pub struct _DevDesc { #[doc = "Area for future expansion.\nBy zeroing this, devices are more likely to work if loaded\ninto a later version of R than that they were compiled under."] pub reserved: [::std::os::raw::c_char; 64usize], } -#[test] -fn bindgen_test_layout__DevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_DevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_DevDesc>(), - 656usize, - concat!("Size of: ", stringify!(_DevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_DevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_DevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(bottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipLeft) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipLeft) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipRight) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipRight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipBottom) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipBottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipTop) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipTop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xCharOffset) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(xCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yCharOffset) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yLineBias) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yLineBias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ipr) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(ipr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cra) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cra) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canClip) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canChangeGamma) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canChangeGamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canHAdj) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canHAdj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startps) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startcol) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startcol) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfill) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startlty) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startlty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfont) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfont) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startgamma) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startgamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceSpecific) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseDown) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseDown) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseMove) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseMove) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseUp) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseUp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenKeybd) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenKeybd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenIdle) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenIdle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gettingEvent) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gettingEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).activate) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(activate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).circle) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(circle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clip) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deactivate) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deactivate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).locator) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(locator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metricInfo) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(metricInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newPage) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newPage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polygon) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polygon) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polyline) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polyline) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rect) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(rect) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).path) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(path) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).raster) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(raster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cap) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cap) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidth) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onExit) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(onExit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getEvent) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(getEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newFrameConfirm) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newFrameConfirm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasTextUTF8) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(hasTextUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).textUTF8) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(textUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidthUTF8) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidthUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wantSymbolUTF8) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(wantSymbolUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useRotatedTextInContour) as usize - ptr as usize }, - 420usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useRotatedTextInContour) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventEnv) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventEnv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventHelper) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventHelper) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).holdflush) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(holdflush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparency) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparency) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparentBg) as usize - ptr as usize }, - 452usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparentBg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveRaster) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveRaster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveCapture) as usize - ptr as usize }, - 460usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveCapture) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveLocator) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveLocator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setPattern) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setPattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releasePattern) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releasePattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setClipPath) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseClipPath) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setMask) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseMask) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceVersion) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceClip) as usize - ptr as usize }, - 524usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).defineGroup) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(defineGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useGroup) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseGroup) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stroke) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(stroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fillStroke) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fillStroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(capabilities) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).glyph) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(glyph) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(reserved) - ) - ); -} pub const R_KeyName_knUNKNOWN: R_KeyName = -1; pub const R_KeyName_knLEFT: R_KeyName = 0; pub const R_KeyName_knUP: R_KeyName = 1; @@ -2806,41 +1006,6 @@ pub struct GESystemDesc { #[doc = "An array of function pointers, one per graphics system that\n has registered with the graphics engine.\n\n system_Callback is called when the graphics engine wants\n to give a graphics system the chance to play with its\n device-specific information (stored in systemSpecific)\n There are two parameters: an \"event\" to tell the graphics\n system why the graphics engine has called this function,\n and the systemSpecific pointer. The graphics engine\n has to pass the systemSpecific pointer because only\n the graphics engine will know what array index to use."] pub callback: GEcallback, } -#[test] -fn bindgen_test_layout_GESystemDesc() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(GESystemDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GESystemDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).systemSpecific) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(systemSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(callback) - ) - ); -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GEDevDesc { @@ -2865,121 +1030,6 @@ pub struct _GEDevDesc { #[doc = "Is a device appending a path ?"] pub appending: Rboolean, } -#[test] -fn bindgen_test_layout__GEDevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_GEDevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_GEDevDesc>(), - 248usize, - concat!("Size of: ", stringify!(_GEDevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_GEDevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_GEDevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dev) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dev) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayList) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DLlastElt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(DLlastElt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).savedSnapshot) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(savedSnapshot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dirty) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dirty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).recordGraphics) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(recordGraphics) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gesd) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(gesd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ask) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(ask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).appending) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(appending) - ) - ); -} pub type pGEDevDesc = *mut GEDevDesc; #[doc = "-------------------------------------------------------------------\n\n COLOUR CODE is concerned with the internals of R colour representation\n\n From colors.c, used in par.c, grid/src/gpar.c"] pub type rcolor = ::std::os::raw::c_uint; @@ -3051,41 +1101,6 @@ pub struct Rcomplex { pub r: f64, pub i: f64, } -#[test] -fn bindgen_test_layout_Rcomplex() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(Rcomplex)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Rcomplex)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(r) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(i) - ) - ); -} pub type __builtin_va_list = [__va_list_tag; 1usize]; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -3095,61 +1110,6 @@ pub struct __va_list_tag { pub overflow_arg_area: *mut ::std::os::raw::c_void, pub reg_save_area: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout___va_list_tag() { - const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} extern "C" { #[doc = "IEEE NaN"] pub static mut R_NaN: f64; diff --git a/bindings/bindings-linux-x86_64-R4.4-devel.rs b/bindings/bindings-linux-x86_64-R4.4-devel.rs index c5727567..12c3b953 100644 --- a/bindings/bindings-linux-x86_64-R4.4-devel.rs +++ b/bindings/bindings-linux-x86_64-R4.4-devel.rs @@ -291,311 +291,6 @@ pub struct _IO_FILE { pub _mode: ::std::os::raw::c_int, pub _unused2: [::std::os::raw::c_char; 20usize], } -#[test] -fn bindgen_test_layout__IO_FILE() { - const UNINIT: ::std::mem::MaybeUninit<_IO_FILE> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_IO_FILE>(), - 216usize, - concat!("Size of: ", stringify!(_IO_FILE)) - ); - assert_eq!( - ::std::mem::align_of::<_IO_FILE>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_FILE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_ptr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_end) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_base) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_base) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_ptr) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_end) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_base) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_end) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_base) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_backup_base) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_backup_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_end) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._markers) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_markers) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._chain) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_chain) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._fileno) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_fileno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._flags2) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._old_offset) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_old_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._cur_column) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_cur_column) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._vtable_offset) as usize - ptr as usize }, - 130usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_vtable_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._shortbuf) as usize - ptr as usize }, - 131usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_shortbuf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._lock) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_lock) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._offset) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._codecvt) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_codecvt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._wide_data) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_wide_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._freeres_list) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_freeres_list) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._freeres_buf) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_freeres_buf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pad5) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad5) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._mode) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._unused2) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_unused2) - ) - ); -} #[doc = ", MAYBE"] pub const Rboolean_FALSE: Rboolean = 0; #[doc = ", MAYBE"] @@ -613,61 +308,6 @@ pub struct R_CMethodDef { pub numArgs: ::std::os::raw::c_int, pub types: *mut R_NativePrimitiveArgType, } -#[test] -fn bindgen_test_layout_R_CMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(R_CMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(numArgs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).types) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(types) - ) - ); -} #[doc = "These are very similar to those in Rdynpriv.h,\nbut we maintain them separately to give us more freedom to do\nsome computations on the internal versions that are derived from\nthese definitions."] pub type R_FortranMethodDef = R_CMethodDef; #[repr(C)] @@ -677,51 +317,6 @@ pub struct R_CallMethodDef { pub fun: DL_FUNC, pub numArgs: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_R_CallMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(numArgs) - ) - ); -} pub type R_ExternalMethodDef = R_CallMethodDef; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -803,91 +398,6 @@ pub struct R_outpstream_st { ::std::option::Option SEXP>, pub OutPersistHookData: SEXP, } -#[test] -fn bindgen_test_layout_R_outpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(R_outpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_outpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookData) - ) - ); -} pub type R_inpstream_t = *mut R_inpstream_st; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -910,142 +420,12 @@ pub struct R_inpstream_st { pub nat2nat_obj: *mut ::std::os::raw::c_void, pub nat2utf8_obj: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_R_inpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(R_inpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_inpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).native_encoding) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(native_encoding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2nat_obj) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2nat_obj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2utf8_obj) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2utf8_obj) - ) - ); -} #[doc = "try to allow some type checking"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct R_hashtab_type { pub cell: SEXP, } -#[test] -fn bindgen_test_layout_R_hashtab_type() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_hashtab_type)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_hashtab_type)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cell) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_hashtab_type), - "::", - stringify!(cell) - ) - ); -} #[doc = "= 0"] pub const SA_TYPE_SA_NORESTORE: SA_TYPE = 0; pub const SA_TYPE_SA_RESTORE: SA_TYPE = 1; @@ -1078,171 +458,6 @@ pub struct structRstart { pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub nconnections: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_structRstart() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(structRstart)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(structRstart)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Quiet) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Quiet) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_NoEcho) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_NoEcho) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Interactive) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Interactive) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Verbose) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Verbose) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadSiteFile) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadSiteFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadInitFile) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DebugInitFile) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(DebugInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RestoreAction) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(RestoreAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).SaveAction) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(SaveAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vsize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nsize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_vsize) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_nsize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ppsize) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(ppsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nconnections) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(nconnections) - ) - ); -} impl structRstart { #[inline] pub fn NoRenviron(&self) -> Rboolean { @@ -1296,31 +511,6 @@ pub type ParseStatus = u32; pub struct R_altrep_class_t { pub ptr: SEXP, } -#[test] -fn bindgen_test_layout_R_altrep_class_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_altrep_class_t), - "::", - stringify!(ptr) - ) - ); -} pub type R_altrep_UnserializeEX_method_t = ::std::option::Option< unsafe extern "C" fn( arg1: SEXP, @@ -1514,161 +704,6 @@ pub struct R_GE_gcontext { #[doc = "Reference to a pattern fill"] pub patternFill: SEXP, } -#[test] -fn bindgen_test_layout_R_GE_gcontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 288usize, - concat!("Size of: ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).col) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(col) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lwd) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lwd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lty) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lend) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lend) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ljoin) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ljoin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lmitre) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lmitre) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cex) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(cex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ps) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lineheight) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lineheight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontface) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontfamily) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontfamily) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).patternFill) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(patternFill) - ) - ); -} pub type pGEcontext = *mut R_GE_gcontext; #[doc = "--------- New (in 1.4.0) device driver structure ---------\n NOTES:\n 1. All locations and dimensions are in device coordinates.\n 2. I found this comment in the doc for dev_Open -- looks nasty\n Any known instances of such a thing happening? Should be\n replaced by a function to query the device for preferred gpars\n settings? (to be called when the device is initialised)\n\n NOTE that it is perfectly acceptable for this\n function to set generic graphics parameters too\n (i.e., override the generic parameter settings\n which GInit sets up) all at the author's own risk\n of course :)\n\n 3. Do we really need dev_StrWidth as well as dev_MetricInfo?\n I can see the difference between the two -- its just a\n question of whether dev_MetricInfo should just return\n what dev_StrWidth would give if font metric information is\n not available. I guess having both allows the developer\n to decide when to ask for which sort of value, and to decide\n what to do when font metric information is not available.\n And why not a dev_StrHeight?\n 4. Should \"ipr\", \"asp\", and \"cra\" be in the device description?\n If not, then where?\n I guess they don't need to be if no device makes use of them.\n On the other hand, they would need to be replaced by a device\n call that R base graphics could use to get enough information\n to figure them out. (e.g., some sort of dpi() function to\n complement the size() function.)"] pub type DevDesc = _DevDesc; @@ -1930,851 +965,6 @@ pub struct _DevDesc { #[doc = "Area for future expansion.\nBy zeroing this, devices are more likely to work if loaded\ninto a later version of R than that they were compiled under."] pub reserved: [::std::os::raw::c_char; 64usize], } -#[test] -fn bindgen_test_layout__DevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_DevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_DevDesc>(), - 656usize, - concat!("Size of: ", stringify!(_DevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_DevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_DevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(bottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipLeft) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipLeft) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipRight) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipRight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipBottom) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipBottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipTop) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipTop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xCharOffset) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(xCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yCharOffset) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yLineBias) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yLineBias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ipr) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(ipr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cra) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cra) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canClip) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canChangeGamma) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canChangeGamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canHAdj) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canHAdj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startps) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startcol) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startcol) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfill) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startlty) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startlty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfont) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfont) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startgamma) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startgamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceSpecific) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseDown) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseDown) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseMove) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseMove) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseUp) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseUp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenKeybd) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenKeybd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenIdle) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenIdle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gettingEvent) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gettingEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).activate) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(activate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).circle) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(circle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clip) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deactivate) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deactivate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).locator) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(locator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metricInfo) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(metricInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newPage) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newPage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polygon) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polygon) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polyline) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polyline) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rect) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(rect) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).path) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(path) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).raster) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(raster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cap) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cap) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidth) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onExit) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(onExit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getEvent) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(getEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newFrameConfirm) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newFrameConfirm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasTextUTF8) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(hasTextUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).textUTF8) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(textUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidthUTF8) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidthUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wantSymbolUTF8) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(wantSymbolUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useRotatedTextInContour) as usize - ptr as usize }, - 420usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useRotatedTextInContour) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventEnv) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventEnv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventHelper) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventHelper) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).holdflush) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(holdflush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparency) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparency) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparentBg) as usize - ptr as usize }, - 452usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparentBg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveRaster) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveRaster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveCapture) as usize - ptr as usize }, - 460usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveCapture) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveLocator) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveLocator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setPattern) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setPattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releasePattern) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releasePattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setClipPath) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseClipPath) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setMask) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseMask) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceVersion) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceClip) as usize - ptr as usize }, - 524usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).defineGroup) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(defineGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useGroup) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseGroup) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stroke) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(stroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fillStroke) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fillStroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(capabilities) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).glyph) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(glyph) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(reserved) - ) - ); -} pub const R_KeyName_knUNKNOWN: R_KeyName = -1; pub const R_KeyName_knLEFT: R_KeyName = 0; pub const R_KeyName_knUP: R_KeyName = 1; @@ -2817,41 +1007,6 @@ pub struct GESystemDesc { #[doc = "An array of function pointers, one per graphics system that\n has registered with the graphics engine.\n\n system_Callback is called when the graphics engine wants\n to give a graphics system the chance to play with its\n device-specific information (stored in systemSpecific)\n There are two parameters: an \"event\" to tell the graphics\n system why the graphics engine has called this function,\n and the systemSpecific pointer. The graphics engine\n has to pass the systemSpecific pointer because only\n the graphics engine will know what array index to use."] pub callback: GEcallback, } -#[test] -fn bindgen_test_layout_GESystemDesc() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(GESystemDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GESystemDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).systemSpecific) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(systemSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(callback) - ) - ); -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GEDevDesc { @@ -2876,121 +1031,6 @@ pub struct _GEDevDesc { #[doc = "Is a device appending a path ?"] pub appending: Rboolean, } -#[test] -fn bindgen_test_layout__GEDevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_GEDevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_GEDevDesc>(), - 248usize, - concat!("Size of: ", stringify!(_GEDevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_GEDevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_GEDevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dev) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dev) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayList) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DLlastElt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(DLlastElt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).savedSnapshot) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(savedSnapshot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dirty) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dirty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).recordGraphics) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(recordGraphics) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gesd) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(gesd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ask) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(ask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).appending) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(appending) - ) - ); -} pub type pGEDevDesc = *mut GEDevDesc; #[doc = "-------------------------------------------------------------------\n\n COLOUR CODE is concerned with the internals of R colour representation\n\n From colors.c, used in par.c, grid/src/gpar.c"] pub type rcolor = ::std::os::raw::c_uint; @@ -3062,41 +1102,6 @@ pub struct Rcomplex { pub r: f64, pub i: f64, } -#[test] -fn bindgen_test_layout_Rcomplex() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(Rcomplex)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Rcomplex)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(r) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(i) - ) - ); -} pub type __builtin_va_list = [__va_list_tag; 1usize]; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -3106,61 +1111,6 @@ pub struct __va_list_tag { pub overflow_arg_area: *mut ::std::os::raw::c_void, pub reg_save_area: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout___va_list_tag() { - const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} extern "C" { #[doc = "IEEE NaN"] pub static mut R_NaN: f64; diff --git a/bindings/bindings-macos-aarch64-R4.3.rs b/bindings/bindings-macos-aarch64-R4.3.rs index 380dc475..051bafd1 100644 --- a/bindings/bindings-macos-aarch64-R4.3.rs +++ b/bindings/bindings-macos-aarch64-R4.3.rs @@ -250,41 +250,6 @@ pub struct __sbuf { pub _base: *mut ::std::os::raw::c_uchar, pub _size: ::std::os::raw::c_int, } -#[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, - concat!("Size of: ", stringify!(__sbuf)) - ); - assert_eq!( - ::std::mem::align_of::<__sbuf>(), - 8usize, - concat!("Alignment of ", stringify!(__sbuf)) - ); - 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)] pub struct __sFILEX { @@ -334,221 +299,6 @@ pub struct __sFILE { pub _blksize: ::std::os::raw::c_int, pub _offset: fpos_t, } -#[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, - concat!("Size of: ", stringify!(__sFILE)) - ); - assert_eq!( - ::std::mem::align_of::<__sFILE>(), - 8usize, - concat!("Alignment of ", stringify!(__sFILE)) - ); - 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; #[doc = ", MAYBE"] pub const Rboolean_FALSE: Rboolean = 0; @@ -567,61 +317,6 @@ pub struct R_CMethodDef { pub numArgs: ::std::os::raw::c_int, pub types: *mut R_NativePrimitiveArgType, } -#[test] -fn bindgen_test_layout_R_CMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(R_CMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(numArgs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).types) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(types) - ) - ); -} #[doc = "These are very similar to those in Rdynpriv.h,\nbut we maintain them separately to give us more freedom to do\nsome computations on the internal versions that are derived from\nthese definitions."] pub type R_FortranMethodDef = R_CMethodDef; #[repr(C)] @@ -631,51 +326,6 @@ pub struct R_CallMethodDef { pub fun: DL_FUNC, pub numArgs: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_R_CallMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(numArgs) - ) - ); -} pub type R_ExternalMethodDef = R_CallMethodDef; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -757,91 +407,6 @@ pub struct R_outpstream_st { ::std::option::Option SEXP>, pub OutPersistHookData: SEXP, } -#[test] -fn bindgen_test_layout_R_outpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(R_outpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_outpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookData) - ) - ); -} pub type R_inpstream_t = *mut R_inpstream_st; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -864,142 +429,12 @@ pub struct R_inpstream_st { pub nat2nat_obj: *mut ::std::os::raw::c_void, pub nat2utf8_obj: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_R_inpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(R_inpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_inpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).native_encoding) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(native_encoding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2nat_obj) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2nat_obj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2utf8_obj) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2utf8_obj) - ) - ); -} #[doc = "try to allow some type checking"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct R_hashtab_type { pub cell: SEXP, } -#[test] -fn bindgen_test_layout_R_hashtab_type() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_hashtab_type)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_hashtab_type)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cell) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_hashtab_type), - "::", - stringify!(cell) - ) - ); -} #[doc = "= 0"] pub const SA_TYPE_SA_NORESTORE: SA_TYPE = 0; pub const SA_TYPE_SA_RESTORE: SA_TYPE = 1; @@ -1032,161 +467,6 @@ pub struct structRstart { pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub __bindgen_padding_0: u32, } -#[test] -fn bindgen_test_layout_structRstart() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(structRstart)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(structRstart)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Quiet) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Quiet) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_NoEcho) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_NoEcho) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Interactive) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Interactive) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Verbose) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Verbose) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadSiteFile) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadSiteFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadInitFile) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DebugInitFile) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(DebugInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RestoreAction) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(RestoreAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).SaveAction) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(SaveAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vsize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nsize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_vsize) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_nsize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ppsize) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(ppsize) - ) - ); -} impl structRstart { #[inline] pub fn NoRenviron(&self) -> Rboolean { @@ -1240,31 +520,6 @@ pub type ParseStatus = u32; pub struct R_altrep_class_t { pub ptr: SEXP, } -#[test] -fn bindgen_test_layout_R_altrep_class_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_altrep_class_t), - "::", - stringify!(ptr) - ) - ); -} pub type R_altrep_UnserializeEX_method_t = ::std::option::Option< unsafe extern "C" fn( arg1: SEXP, @@ -1458,161 +713,6 @@ pub struct R_GE_gcontext { #[doc = "Reference to a pattern fill"] pub patternFill: SEXP, } -#[test] -fn bindgen_test_layout_R_GE_gcontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 288usize, - concat!("Size of: ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).col) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(col) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lwd) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lwd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lty) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lend) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lend) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ljoin) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ljoin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lmitre) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lmitre) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cex) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(cex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ps) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lineheight) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lineheight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontface) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontfamily) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontfamily) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).patternFill) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(patternFill) - ) - ); -} pub type pGEcontext = *mut R_GE_gcontext; #[doc = "--------- New (in 1.4.0) device driver structure ---------\n NOTES:\n 1. All locations and dimensions are in device coordinates.\n 2. I found this comment in the doc for dev_Open -- looks nasty\n Any known instances of such a thing happening? Should be\n replaced by a function to query the device for preferred gpars\n settings? (to be called when the device is initialised)\n\n NOTE that it is perfectly acceptable for this\n function to set generic graphics parameters too\n (i.e., override the generic parameter settings\n which GInit sets up) all at the author's own risk\n of course :)\n\n 3. Do we really need dev_StrWidth as well as dev_MetricInfo?\n I can see the difference between the two -- its just a\n question of whether dev_MetricInfo should just return\n what dev_StrWidth would give if font metric information is\n not available. I guess having both allows the developer\n to decide when to ask for which sort of value, and to decide\n what to do when font metric information is not available.\n And why not a dev_StrHeight?\n 4. Should \"ipr\", \"asp\", and \"cra\" be in the device description?\n If not, then where?\n I guess they don't need to be if no device makes use of them.\n On the other hand, they would need to be replaced by a device\n call that R base graphics could use to get enough information\n to figure them out. (e.g., some sort of dpi() function to\n complement the size() function.)"] pub type DevDesc = _DevDesc; @@ -1874,851 +974,6 @@ pub struct _DevDesc { #[doc = "Area for future expansion.\nBy zeroing this, devices are more likely to work if loaded\ninto a later version of R than that they were compiled under."] pub reserved: [::std::os::raw::c_char; 64usize], } -#[test] -fn bindgen_test_layout__DevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_DevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_DevDesc>(), - 656usize, - concat!("Size of: ", stringify!(_DevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_DevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_DevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(bottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipLeft) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipLeft) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipRight) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipRight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipBottom) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipBottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipTop) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipTop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xCharOffset) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(xCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yCharOffset) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yLineBias) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yLineBias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ipr) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(ipr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cra) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cra) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canClip) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canChangeGamma) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canChangeGamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canHAdj) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canHAdj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startps) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startcol) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startcol) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfill) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startlty) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startlty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfont) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfont) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startgamma) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startgamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceSpecific) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseDown) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseDown) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseMove) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseMove) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseUp) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseUp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenKeybd) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenKeybd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenIdle) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenIdle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gettingEvent) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gettingEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).activate) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(activate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).circle) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(circle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clip) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deactivate) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deactivate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).locator) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(locator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metricInfo) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(metricInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newPage) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newPage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polygon) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polygon) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polyline) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polyline) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rect) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(rect) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).path) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(path) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).raster) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(raster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cap) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cap) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidth) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onExit) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(onExit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getEvent) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(getEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newFrameConfirm) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newFrameConfirm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasTextUTF8) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(hasTextUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).textUTF8) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(textUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidthUTF8) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidthUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wantSymbolUTF8) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(wantSymbolUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useRotatedTextInContour) as usize - ptr as usize }, - 420usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useRotatedTextInContour) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventEnv) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventEnv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventHelper) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventHelper) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).holdflush) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(holdflush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparency) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparency) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparentBg) as usize - ptr as usize }, - 452usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparentBg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveRaster) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveRaster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveCapture) as usize - ptr as usize }, - 460usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveCapture) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveLocator) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveLocator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setPattern) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setPattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releasePattern) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releasePattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setClipPath) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseClipPath) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setMask) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseMask) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceVersion) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceClip) as usize - ptr as usize }, - 524usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).defineGroup) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(defineGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useGroup) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseGroup) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stroke) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(stroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fillStroke) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fillStroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(capabilities) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).glyph) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(glyph) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(reserved) - ) - ); -} pub const R_KeyName_knUNKNOWN: R_KeyName = -1; pub const R_KeyName_knLEFT: R_KeyName = 0; pub const R_KeyName_knUP: R_KeyName = 1; @@ -2761,41 +1016,6 @@ pub struct GESystemDesc { #[doc = "An array of function pointers, one per graphics system that\n has registered with the graphics engine.\n\n system_Callback is called when the graphics engine wants\n to give a graphics system the chance to play with its\n device-specific information (stored in systemSpecific)\n There are two parameters: an \"event\" to tell the graphics\n system why the graphics engine has called this function,\n and the systemSpecific pointer. The graphics engine\n has to pass the systemSpecific pointer because only\n the graphics engine will know what array index to use."] pub callback: GEcallback, } -#[test] -fn bindgen_test_layout_GESystemDesc() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(GESystemDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GESystemDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).systemSpecific) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(systemSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(callback) - ) - ); -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GEDevDesc { @@ -2820,121 +1040,6 @@ pub struct _GEDevDesc { #[doc = "Is a device appending a path ?"] pub appending: Rboolean, } -#[test] -fn bindgen_test_layout__GEDevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_GEDevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_GEDevDesc>(), - 248usize, - concat!("Size of: ", stringify!(_GEDevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_GEDevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_GEDevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dev) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dev) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayList) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DLlastElt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(DLlastElt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).savedSnapshot) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(savedSnapshot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dirty) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dirty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).recordGraphics) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(recordGraphics) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gesd) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(gesd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ask) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(ask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).appending) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(appending) - ) - ); -} pub type pGEDevDesc = *mut GEDevDesc; #[doc = "-------------------------------------------------------------------\n\n COLOUR CODE is concerned with the internals of R colour representation\n\n From colors.c, used in par.c, grid/src/gpar.c"] pub type rcolor = ::std::os::raw::c_uint; @@ -3006,41 +1111,6 @@ pub struct Rcomplex { pub r: f64, pub i: f64, } -#[test] -fn bindgen_test_layout_Rcomplex() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(Rcomplex)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Rcomplex)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(r) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(i) - ) - ); -} pub type __builtin_va_list = *mut ::std::os::raw::c_char; extern "C" { #[doc = "IEEE NaN"] diff --git a/bindings/bindings-macos-x86_64-R4.2.rs b/bindings/bindings-macos-x86_64-R4.2.rs index 4e9363bc..f3f831a3 100644 --- a/bindings/bindings-macos-x86_64-R4.2.rs +++ b/bindings/bindings-macos-x86_64-R4.2.rs @@ -244,41 +244,6 @@ pub struct __sbuf { pub _base: *mut ::std::os::raw::c_uchar, pub _size: ::std::os::raw::c_int, } -#[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, - concat!("Size of: ", stringify!(__sbuf)) - ); - assert_eq!( - ::std::mem::align_of::<__sbuf>(), - 8usize, - concat!("Alignment of ", stringify!(__sbuf)) - ); - 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)] pub struct __sFILEX { @@ -328,221 +293,6 @@ pub struct __sFILE { pub _blksize: ::std::os::raw::c_int, pub _offset: fpos_t, } -#[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, - concat!("Size of: ", stringify!(__sFILE)) - ); - assert_eq!( - ::std::mem::align_of::<__sFILE>(), - 8usize, - concat!("Alignment of ", stringify!(__sFILE)) - ); - 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; #[doc = ", MAYBE"] pub const Rboolean_FALSE: Rboolean = 0; @@ -561,61 +311,6 @@ pub struct R_CMethodDef { pub numArgs: ::std::os::raw::c_int, pub types: *mut R_NativePrimitiveArgType, } -#[test] -fn bindgen_test_layout_R_CMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(R_CMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(numArgs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).types) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(types) - ) - ); -} #[doc = "These are very similar to those in Rdynpriv.h,\nbut we maintain them separately to give us more freedom to do\nsome computations on the internal versions that are derived from\nthese definitions."] pub type R_FortranMethodDef = R_CMethodDef; #[repr(C)] @@ -625,51 +320,6 @@ pub struct R_CallMethodDef { pub fun: DL_FUNC, pub numArgs: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_R_CallMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(numArgs) - ) - ); -} pub type R_ExternalMethodDef = R_CallMethodDef; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -751,91 +401,6 @@ pub struct R_outpstream_st { ::std::option::Option SEXP>, pub OutPersistHookData: SEXP, } -#[test] -fn bindgen_test_layout_R_outpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(R_outpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_outpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookData) - ) - ); -} pub type R_inpstream_t = *mut R_inpstream_st; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -858,142 +423,12 @@ pub struct R_inpstream_st { pub nat2nat_obj: *mut ::std::os::raw::c_void, pub nat2utf8_obj: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_R_inpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(R_inpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_inpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).native_encoding) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(native_encoding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2nat_obj) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2nat_obj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2utf8_obj) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2utf8_obj) - ) - ); -} #[doc = "try to allow some type checking"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct R_hashtab_type { pub cell: SEXP, } -#[test] -fn bindgen_test_layout_R_hashtab_type() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_hashtab_type)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_hashtab_type)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cell) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_hashtab_type), - "::", - stringify!(cell) - ) - ); -} #[doc = "= 0"] pub const SA_TYPE_SA_NORESTORE: SA_TYPE = 0; pub const SA_TYPE_SA_RESTORE: SA_TYPE = 1; @@ -1026,161 +461,6 @@ pub struct structRstart { pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub __bindgen_padding_0: u32, } -#[test] -fn bindgen_test_layout_structRstart() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(structRstart)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(structRstart)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Quiet) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Quiet) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_NoEcho) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_NoEcho) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Interactive) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Interactive) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Verbose) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Verbose) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadSiteFile) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadSiteFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadInitFile) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DebugInitFile) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(DebugInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RestoreAction) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(RestoreAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).SaveAction) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(SaveAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vsize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nsize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_vsize) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_nsize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ppsize) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(ppsize) - ) - ); -} impl structRstart { #[inline] pub fn NoRenviron(&self) -> Rboolean { @@ -1234,31 +514,6 @@ pub type ParseStatus = u32; pub struct R_altrep_class_t { pub ptr: SEXP, } -#[test] -fn bindgen_test_layout_R_altrep_class_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_altrep_class_t), - "::", - stringify!(ptr) - ) - ); -} pub type R_altrep_UnserializeEX_method_t = ::std::option::Option< unsafe extern "C" fn( arg1: SEXP, @@ -1448,161 +703,6 @@ pub struct R_GE_gcontext { #[doc = "Reference to a pattern fill"] pub patternFill: SEXP, } -#[test] -fn bindgen_test_layout_R_GE_gcontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 288usize, - concat!("Size of: ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).col) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(col) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lwd) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lwd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lty) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lend) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lend) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ljoin) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ljoin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lmitre) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lmitre) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cex) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(cex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ps) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lineheight) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lineheight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontface) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontfamily) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontfamily) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).patternFill) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(patternFill) - ) - ); -} pub type pGEcontext = *mut R_GE_gcontext; #[doc = "--------- New (in 1.4.0) device driver structure ---------\n NOTES:\n 1. All locations and dimensions are in device coordinates.\n 2. I found this comment in the doc for dev_Open -- looks nasty\n Any known instances of such a thing happening? Should be\n replaced by a function to query the device for preferred gpars\n settings? (to be called when the device is initialised)\n\n NOTE that it is perfectly acceptable for this\n function to set generic graphics parameters too\n (i.e., override the generic parameter settings\n which GInit sets up) all at the author's own risk\n of course :)\n\n 3. Do we really need dev_StrWidth as well as dev_MetricInfo?\n I can see the difference between the two -- its just a\n question of whether dev_MetricInfo should just return\n what dev_StrWidth would give if font metric information is\n not available. I guess having both allows the developer\n to decide when to ask for which sort of value, and to decide\n what to do when font metric information is not available.\n And why not a dev_StrHeight?\n 4. Should \"ipr\", \"asp\", and \"cra\" be in the device description?\n If not, then where?\n I guess they don't need to be if no device makes use of them.\n On the other hand, they would need to be replaced by a device\n call that R base graphics could use to get enough information\n to figure them out. (e.g., some sort of dpi() function to\n complement the size() function.)"] pub type DevDesc = _DevDesc; @@ -1851,841 +951,6 @@ pub struct _DevDesc { #[doc = "Area for future expansion.\nBy zeroing this, devices are more likely to work if loaded\ninto a later version of R than that they were compiled under."] pub reserved: [::std::os::raw::c_char; 64usize], } -#[test] -fn bindgen_test_layout__DevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_DevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_DevDesc>(), - 648usize, - concat!("Size of: ", stringify!(_DevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_DevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_DevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(bottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipLeft) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipLeft) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipRight) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipRight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipBottom) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipBottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipTop) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipTop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xCharOffset) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(xCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yCharOffset) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yLineBias) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yLineBias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ipr) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(ipr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cra) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cra) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canClip) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canChangeGamma) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canChangeGamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canHAdj) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canHAdj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startps) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startcol) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startcol) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfill) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startlty) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startlty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfont) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfont) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startgamma) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startgamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceSpecific) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseDown) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseDown) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseMove) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseMove) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseUp) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseUp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenKeybd) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenKeybd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenIdle) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenIdle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gettingEvent) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gettingEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).activate) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(activate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).circle) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(circle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clip) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deactivate) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deactivate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).locator) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(locator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metricInfo) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(metricInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newPage) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newPage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polygon) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polygon) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polyline) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polyline) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rect) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(rect) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).path) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(path) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).raster) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(raster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cap) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cap) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidth) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onExit) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(onExit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getEvent) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(getEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newFrameConfirm) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newFrameConfirm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasTextUTF8) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(hasTextUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).textUTF8) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(textUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidthUTF8) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidthUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wantSymbolUTF8) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(wantSymbolUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useRotatedTextInContour) as usize - ptr as usize }, - 420usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useRotatedTextInContour) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventEnv) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventEnv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventHelper) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventHelper) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).holdflush) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(holdflush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparency) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparency) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparentBg) as usize - ptr as usize }, - 452usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparentBg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveRaster) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveRaster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveCapture) as usize - ptr as usize }, - 460usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveCapture) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveLocator) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveLocator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setPattern) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setPattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releasePattern) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releasePattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setClipPath) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseClipPath) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setMask) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseMask) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceVersion) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceClip) as usize - ptr as usize }, - 524usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).defineGroup) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(defineGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useGroup) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseGroup) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stroke) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(stroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fillStroke) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fillStroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(capabilities) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(reserved) - ) - ); -} pub const R_KeyName_knUNKNOWN: R_KeyName = -1; pub const R_KeyName_knLEFT: R_KeyName = 0; pub const R_KeyName_knUP: R_KeyName = 1; @@ -2728,41 +993,6 @@ pub struct GESystemDesc { #[doc = "An array of function pointers, one per graphics system that\n has registered with the graphics engine.\n\n system_Callback is called when the graphics engine wants\n to give a graphics system the chance to play with its\n device-specific information (stored in systemSpecific)\n There are two parameters: an \"event\" to tell the graphics\n system why the graphics engine has called this function,\n and the systemSpecific pointer. The graphics engine\n has to pass the systemSpecific pointer because only\n the graphics engine will know what array index to use."] pub callback: GEcallback, } -#[test] -fn bindgen_test_layout_GESystemDesc() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(GESystemDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GESystemDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).systemSpecific) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(systemSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(callback) - ) - ); -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GEDevDesc { @@ -2787,121 +1017,6 @@ pub struct _GEDevDesc { #[doc = "Is a device appending a path ?"] pub appending: Rboolean, } -#[test] -fn bindgen_test_layout__GEDevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_GEDevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_GEDevDesc>(), - 248usize, - concat!("Size of: ", stringify!(_GEDevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_GEDevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_GEDevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dev) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dev) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayList) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DLlastElt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(DLlastElt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).savedSnapshot) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(savedSnapshot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dirty) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dirty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).recordGraphics) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(recordGraphics) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gesd) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(gesd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ask) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(ask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).appending) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(appending) - ) - ); -} pub type pGEDevDesc = *mut GEDevDesc; #[doc = "-------------------------------------------------------------------\n\n COLOUR CODE is concerned with the internals of R colour representation\n\n From colors.c, used in par.c, grid/src/gpar.c"] pub type rcolor = ::std::os::raw::c_uint; @@ -2973,41 +1088,6 @@ pub struct Rcomplex { pub r: f64, pub i: f64, } -#[test] -fn bindgen_test_layout_Rcomplex() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(Rcomplex)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Rcomplex)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(r) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(i) - ) - ); -} pub type __builtin_va_list = [__va_list_tag; 1usize]; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -3017,61 +1097,6 @@ pub struct __va_list_tag { pub overflow_arg_area: *mut ::std::os::raw::c_void, pub reg_save_area: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout___va_list_tag() { - const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} extern "C" { #[doc = "IEEE NaN"] pub static mut R_NaN: f64; diff --git a/bindings/bindings-macos-x86_64-R4.3.rs b/bindings/bindings-macos-x86_64-R4.3.rs index 8e249cbb..1d1547c9 100644 --- a/bindings/bindings-macos-x86_64-R4.3.rs +++ b/bindings/bindings-macos-x86_64-R4.3.rs @@ -1,8 +1,8 @@ /* automatically generated by rust-bindgen 0.69.1 */ /* libR-sys version: 0.6.0 */ -/* bindgen clang version: Homebrew clang version 17.0.3 */ -/* clang-rs version: Homebrew clang version 17.0.3 */ +/* bindgen clang version: Homebrew clang version 16.0.6 */ +/* clang-rs version: Homebrew clang version 16.0.6 */ /* r version: 4.3.2 */ #[repr(C)] @@ -250,41 +250,6 @@ pub struct __sbuf { pub _base: *mut ::std::os::raw::c_uchar, pub _size: ::std::os::raw::c_int, } -#[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, - concat!("Size of: ", stringify!(__sbuf)) - ); - assert_eq!( - ::std::mem::align_of::<__sbuf>(), - 8usize, - concat!("Alignment of ", stringify!(__sbuf)) - ); - 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)] pub struct __sFILEX { @@ -334,221 +299,6 @@ pub struct __sFILE { pub _blksize: ::std::os::raw::c_int, pub _offset: fpos_t, } -#[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, - concat!("Size of: ", stringify!(__sFILE)) - ); - assert_eq!( - ::std::mem::align_of::<__sFILE>(), - 8usize, - concat!("Alignment of ", stringify!(__sFILE)) - ); - 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; #[doc = ", MAYBE"] pub const Rboolean_FALSE: Rboolean = 0; @@ -567,61 +317,6 @@ pub struct R_CMethodDef { pub numArgs: ::std::os::raw::c_int, pub types: *mut R_NativePrimitiveArgType, } -#[test] -fn bindgen_test_layout_R_CMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(R_CMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(numArgs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).types) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(types) - ) - ); -} #[doc = "These are very similar to those in Rdynpriv.h,\nbut we maintain them separately to give us more freedom to do\nsome computations on the internal versions that are derived from\nthese definitions."] pub type R_FortranMethodDef = R_CMethodDef; #[repr(C)] @@ -631,51 +326,6 @@ pub struct R_CallMethodDef { pub fun: DL_FUNC, pub numArgs: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_R_CallMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(numArgs) - ) - ); -} pub type R_ExternalMethodDef = R_CallMethodDef; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -757,91 +407,6 @@ pub struct R_outpstream_st { ::std::option::Option SEXP>, pub OutPersistHookData: SEXP, } -#[test] -fn bindgen_test_layout_R_outpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(R_outpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_outpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookData) - ) - ); -} pub type R_inpstream_t = *mut R_inpstream_st; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -864,142 +429,12 @@ pub struct R_inpstream_st { pub nat2nat_obj: *mut ::std::os::raw::c_void, pub nat2utf8_obj: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_R_inpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(R_inpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_inpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).native_encoding) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(native_encoding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2nat_obj) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2nat_obj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2utf8_obj) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2utf8_obj) - ) - ); -} #[doc = "try to allow some type checking"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct R_hashtab_type { pub cell: SEXP, } -#[test] -fn bindgen_test_layout_R_hashtab_type() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_hashtab_type)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_hashtab_type)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cell) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_hashtab_type), - "::", - stringify!(cell) - ) - ); -} #[doc = "= 0"] pub const SA_TYPE_SA_NORESTORE: SA_TYPE = 0; pub const SA_TYPE_SA_RESTORE: SA_TYPE = 1; @@ -1032,161 +467,6 @@ pub struct structRstart { pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub __bindgen_padding_0: u32, } -#[test] -fn bindgen_test_layout_structRstart() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(structRstart)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(structRstart)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Quiet) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Quiet) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_NoEcho) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_NoEcho) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Interactive) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Interactive) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Verbose) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Verbose) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadSiteFile) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadSiteFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadInitFile) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DebugInitFile) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(DebugInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RestoreAction) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(RestoreAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).SaveAction) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(SaveAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vsize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nsize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_vsize) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_nsize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ppsize) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(ppsize) - ) - ); -} impl structRstart { #[inline] pub fn NoRenviron(&self) -> Rboolean { @@ -1240,31 +520,6 @@ pub type ParseStatus = u32; pub struct R_altrep_class_t { pub ptr: SEXP, } -#[test] -fn bindgen_test_layout_R_altrep_class_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_altrep_class_t), - "::", - stringify!(ptr) - ) - ); -} pub type R_altrep_UnserializeEX_method_t = ::std::option::Option< unsafe extern "C" fn( arg1: SEXP, @@ -1458,161 +713,6 @@ pub struct R_GE_gcontext { #[doc = "Reference to a pattern fill"] pub patternFill: SEXP, } -#[test] -fn bindgen_test_layout_R_GE_gcontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 288usize, - concat!("Size of: ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).col) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(col) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lwd) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lwd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lty) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lend) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lend) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ljoin) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ljoin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lmitre) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lmitre) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cex) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(cex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ps) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lineheight) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lineheight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontface) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontfamily) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontfamily) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).patternFill) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(patternFill) - ) - ); -} pub type pGEcontext = *mut R_GE_gcontext; #[doc = "--------- New (in 1.4.0) device driver structure ---------\n NOTES:\n 1. All locations and dimensions are in device coordinates.\n 2. I found this comment in the doc for dev_Open -- looks nasty\n Any known instances of such a thing happening? Should be\n replaced by a function to query the device for preferred gpars\n settings? (to be called when the device is initialised)\n\n NOTE that it is perfectly acceptable for this\n function to set generic graphics parameters too\n (i.e., override the generic parameter settings\n which GInit sets up) all at the author's own risk\n of course :)\n\n 3. Do we really need dev_StrWidth as well as dev_MetricInfo?\n I can see the difference between the two -- its just a\n question of whether dev_MetricInfo should just return\n what dev_StrWidth would give if font metric information is\n not available. I guess having both allows the developer\n to decide when to ask for which sort of value, and to decide\n what to do when font metric information is not available.\n And why not a dev_StrHeight?\n 4. Should \"ipr\", \"asp\", and \"cra\" be in the device description?\n If not, then where?\n I guess they don't need to be if no device makes use of them.\n On the other hand, they would need to be replaced by a device\n call that R base graphics could use to get enough information\n to figure them out. (e.g., some sort of dpi() function to\n complement the size() function.)"] pub type DevDesc = _DevDesc; @@ -1874,851 +974,6 @@ pub struct _DevDesc { #[doc = "Area for future expansion.\nBy zeroing this, devices are more likely to work if loaded\ninto a later version of R than that they were compiled under."] pub reserved: [::std::os::raw::c_char; 64usize], } -#[test] -fn bindgen_test_layout__DevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_DevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_DevDesc>(), - 656usize, - concat!("Size of: ", stringify!(_DevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_DevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_DevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(bottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipLeft) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipLeft) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipRight) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipRight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipBottom) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipBottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipTop) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipTop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xCharOffset) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(xCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yCharOffset) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yLineBias) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yLineBias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ipr) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(ipr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cra) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cra) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canClip) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canChangeGamma) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canChangeGamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canHAdj) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canHAdj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startps) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startcol) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startcol) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfill) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startlty) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startlty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfont) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfont) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startgamma) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startgamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceSpecific) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseDown) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseDown) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseMove) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseMove) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseUp) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseUp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenKeybd) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenKeybd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenIdle) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenIdle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gettingEvent) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gettingEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).activate) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(activate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).circle) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(circle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clip) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deactivate) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deactivate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).locator) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(locator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metricInfo) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(metricInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newPage) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newPage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polygon) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polygon) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polyline) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polyline) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rect) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(rect) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).path) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(path) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).raster) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(raster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cap) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cap) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidth) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onExit) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(onExit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getEvent) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(getEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newFrameConfirm) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newFrameConfirm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasTextUTF8) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(hasTextUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).textUTF8) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(textUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidthUTF8) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidthUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wantSymbolUTF8) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(wantSymbolUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useRotatedTextInContour) as usize - ptr as usize }, - 420usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useRotatedTextInContour) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventEnv) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventEnv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventHelper) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventHelper) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).holdflush) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(holdflush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparency) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparency) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparentBg) as usize - ptr as usize }, - 452usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparentBg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveRaster) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveRaster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveCapture) as usize - ptr as usize }, - 460usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveCapture) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveLocator) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveLocator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setPattern) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setPattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releasePattern) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releasePattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setClipPath) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseClipPath) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setMask) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseMask) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceVersion) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceClip) as usize - ptr as usize }, - 524usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).defineGroup) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(defineGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useGroup) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseGroup) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stroke) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(stroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fillStroke) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fillStroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(capabilities) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).glyph) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(glyph) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(reserved) - ) - ); -} pub const R_KeyName_knUNKNOWN: R_KeyName = -1; pub const R_KeyName_knLEFT: R_KeyName = 0; pub const R_KeyName_knUP: R_KeyName = 1; @@ -2761,41 +1016,6 @@ pub struct GESystemDesc { #[doc = "An array of function pointers, one per graphics system that\n has registered with the graphics engine.\n\n system_Callback is called when the graphics engine wants\n to give a graphics system the chance to play with its\n device-specific information (stored in systemSpecific)\n There are two parameters: an \"event\" to tell the graphics\n system why the graphics engine has called this function,\n and the systemSpecific pointer. The graphics engine\n has to pass the systemSpecific pointer because only\n the graphics engine will know what array index to use."] pub callback: GEcallback, } -#[test] -fn bindgen_test_layout_GESystemDesc() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(GESystemDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GESystemDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).systemSpecific) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(systemSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(callback) - ) - ); -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GEDevDesc { @@ -2820,121 +1040,6 @@ pub struct _GEDevDesc { #[doc = "Is a device appending a path ?"] pub appending: Rboolean, } -#[test] -fn bindgen_test_layout__GEDevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_GEDevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_GEDevDesc>(), - 248usize, - concat!("Size of: ", stringify!(_GEDevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_GEDevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_GEDevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dev) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dev) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayList) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DLlastElt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(DLlastElt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).savedSnapshot) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(savedSnapshot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dirty) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dirty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).recordGraphics) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(recordGraphics) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gesd) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(gesd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ask) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(ask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).appending) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(appending) - ) - ); -} pub type pGEDevDesc = *mut GEDevDesc; #[doc = "-------------------------------------------------------------------\n\n COLOUR CODE is concerned with the internals of R colour representation\n\n From colors.c, used in par.c, grid/src/gpar.c"] pub type rcolor = ::std::os::raw::c_uint; @@ -3006,41 +1111,6 @@ pub struct Rcomplex { pub r: f64, pub i: f64, } -#[test] -fn bindgen_test_layout_Rcomplex() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(Rcomplex)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Rcomplex)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(r) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(i) - ) - ); -} pub type __builtin_va_list = [__va_list_tag; 1usize]; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -3050,61 +1120,6 @@ pub struct __va_list_tag { pub overflow_arg_area: *mut ::std::os::raw::c_void, pub reg_save_area: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout___va_list_tag() { - const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} extern "C" { #[doc = "IEEE NaN"] pub static mut R_NaN: f64; @@ -4038,7 +2053,6 @@ extern "C" { pub fn unif_rand() -> f64; pub fn R_unif_index(arg1: f64) -> f64; pub fn exp_rand() -> f64; - #[doc = "Normal Distribution"] pub fn Rf_dnorm4(arg1: f64, arg2: f64, arg3: f64, arg4: ::std::os::raw::c_int) -> f64; pub fn Rf_pnorm5( arg1: f64, @@ -4062,7 +2076,6 @@ extern "C" { arg4: ::std::os::raw::c_int, arg5: ::std::os::raw::c_int, ); - #[doc = "Uniform Distribution"] pub fn Rf_dunif(arg1: f64, arg2: f64, arg3: f64, arg4: ::std::os::raw::c_int) -> f64; pub fn Rf_punif( arg1: f64, @@ -4079,7 +2092,6 @@ extern "C" { arg5: ::std::os::raw::c_int, ) -> f64; pub fn Rf_runif(arg1: f64, arg2: f64) -> f64; - #[doc = "Gamma Distribution"] pub fn Rf_dgamma(arg1: f64, arg2: f64, arg3: f64, arg4: ::std::os::raw::c_int) -> f64; pub fn Rf_pgamma( arg1: f64, @@ -4100,11 +2112,9 @@ extern "C" { pub fn Rf_log1pexp(arg1: f64) -> f64; pub fn Rf_log1mexp(arg1: f64) -> f64; pub fn Rf_lgamma1p(arg1: f64) -> f64; - #[doc = "Compute the log of a sum or difference from logs of terms, i.e.,\n\n log (exp (logx) + exp (logy))\n or log (exp (logx) - exp (logy))\n\n without causing overflows or throwing away too much accuracy:"] pub fn Rf_logspace_add(arg1: f64, arg2: f64) -> f64; pub fn Rf_logspace_sub(arg1: f64, arg2: f64) -> f64; pub fn Rf_logspace_sum(arg1: *const f64, arg2: ::std::os::raw::c_int) -> f64; - #[doc = "Beta Distribution"] pub fn Rf_dbeta(arg1: f64, arg2: f64, arg3: f64, arg4: ::std::os::raw::c_int) -> f64; pub fn Rf_pbeta( arg1: f64, @@ -4121,7 +2131,6 @@ extern "C" { arg5: ::std::os::raw::c_int, ) -> f64; pub fn Rf_rbeta(arg1: f64, arg2: f64) -> f64; - #[doc = "Lognormal Distribution"] pub fn Rf_dlnorm(arg1: f64, arg2: f64, arg3: f64, arg4: ::std::os::raw::c_int) -> f64; pub fn Rf_plnorm( arg1: f64, @@ -4138,7 +2147,6 @@ extern "C" { arg5: ::std::os::raw::c_int, ) -> f64; pub fn Rf_rlnorm(arg1: f64, arg2: f64) -> f64; - #[doc = "Chi-squared Distribution"] pub fn Rf_dchisq(arg1: f64, arg2: f64, arg3: ::std::os::raw::c_int) -> f64; pub fn Rf_pchisq( arg1: f64, @@ -4153,7 +2161,6 @@ extern "C" { arg4: ::std::os::raw::c_int, ) -> f64; pub fn Rf_rchisq(arg1: f64) -> f64; - #[doc = "Non-central Chi-squared Distribution"] pub fn Rf_dnchisq(arg1: f64, arg2: f64, arg3: f64, arg4: ::std::os::raw::c_int) -> f64; pub fn Rf_pnchisq( arg1: f64, @@ -4170,7 +2177,6 @@ extern "C" { arg5: ::std::os::raw::c_int, ) -> f64; pub fn Rf_rnchisq(arg1: f64, arg2: f64) -> f64; - #[doc = "F Distribution"] pub fn Rf_df(arg1: f64, arg2: f64, arg3: f64, arg4: ::std::os::raw::c_int) -> f64; pub fn Rf_pf( arg1: f64, @@ -4187,7 +2193,6 @@ extern "C" { arg5: ::std::os::raw::c_int, ) -> f64; pub fn Rf_rf(arg1: f64, arg2: f64) -> f64; - #[doc = "Student t Distribution"] pub fn Rf_dt(arg1: f64, arg2: f64, arg3: ::std::os::raw::c_int) -> f64; pub fn Rf_pt( arg1: f64, @@ -4202,7 +2207,6 @@ extern "C" { arg4: ::std::os::raw::c_int, ) -> f64; pub fn Rf_rt(arg1: f64) -> f64; - #[doc = "Binomial Distribution"] pub fn Rf_dbinom_raw(x: f64, n: f64, p: f64, q: f64, give_log: ::std::os::raw::c_int) -> f64; pub fn Rf_dbinom(arg1: f64, arg2: f64, arg3: f64, arg4: ::std::os::raw::c_int) -> f64; pub fn Rf_pbinom( @@ -4220,14 +2224,12 @@ extern "C" { arg5: ::std::os::raw::c_int, ) -> f64; pub fn Rf_rbinom(arg1: f64, arg2: f64) -> f64; - #[doc = "Multinomial Distribution"] pub fn Rf_rmultinom( arg1: ::std::os::raw::c_int, arg2: *mut f64, arg3: ::std::os::raw::c_int, arg4: *mut ::std::os::raw::c_int, ); - #[doc = "Cauchy Distribution"] pub fn Rf_dcauchy(arg1: f64, arg2: f64, arg3: f64, arg4: ::std::os::raw::c_int) -> f64; pub fn Rf_pcauchy( arg1: f64, @@ -4244,7 +2246,6 @@ extern "C" { arg5: ::std::os::raw::c_int, ) -> f64; pub fn Rf_rcauchy(arg1: f64, arg2: f64) -> f64; - #[doc = "Exponential Distribution"] pub fn Rf_dexp(arg1: f64, arg2: f64, arg3: ::std::os::raw::c_int) -> f64; pub fn Rf_pexp( arg1: f64, @@ -4259,7 +2260,6 @@ extern "C" { arg4: ::std::os::raw::c_int, ) -> f64; pub fn Rf_rexp(arg1: f64) -> f64; - #[doc = "Geometric Distribution"] pub fn Rf_dgeom(arg1: f64, arg2: f64, arg3: ::std::os::raw::c_int) -> f64; pub fn Rf_pgeom( arg1: f64, @@ -4274,7 +2274,6 @@ extern "C" { arg4: ::std::os::raw::c_int, ) -> f64; pub fn Rf_rgeom(arg1: f64) -> f64; - #[doc = "Hypergeometric Distribution"] pub fn Rf_dhyper( arg1: f64, arg2: f64, @@ -4299,7 +2298,6 @@ extern "C" { arg6: ::std::os::raw::c_int, ) -> f64; pub fn Rf_rhyper(arg1: f64, arg2: f64, arg3: f64) -> f64; - #[doc = "Negative Binomial Distribution"] pub fn Rf_dnbinom(arg1: f64, arg2: f64, arg3: f64, arg4: ::std::os::raw::c_int) -> f64; pub fn Rf_pnbinom( arg1: f64, @@ -4332,7 +2330,6 @@ extern "C" { arg5: ::std::os::raw::c_int, ) -> f64; pub fn Rf_rnbinom_mu(arg1: f64, arg2: f64) -> f64; - #[doc = "Poisson Distribution"] pub fn Rf_dpois_raw(arg1: f64, arg2: f64, arg3: ::std::os::raw::c_int) -> f64; pub fn Rf_dpois(arg1: f64, arg2: f64, arg3: ::std::os::raw::c_int) -> f64; pub fn Rf_ppois( @@ -4348,7 +2345,6 @@ extern "C" { arg4: ::std::os::raw::c_int, ) -> f64; pub fn Rf_rpois(arg1: f64) -> f64; - #[doc = "Weibull Distribution"] pub fn Rf_dweibull(arg1: f64, arg2: f64, arg3: f64, arg4: ::std::os::raw::c_int) -> f64; pub fn Rf_pweibull( arg1: f64, @@ -4365,7 +2361,6 @@ extern "C" { arg5: ::std::os::raw::c_int, ) -> f64; pub fn Rf_rweibull(arg1: f64, arg2: f64) -> f64; - #[doc = "Logistic Distribution"] pub fn Rf_dlogis(arg1: f64, arg2: f64, arg3: f64, arg4: ::std::os::raw::c_int) -> f64; pub fn Rf_plogis( arg1: f64, @@ -4382,7 +2377,6 @@ extern "C" { arg5: ::std::os::raw::c_int, ) -> f64; pub fn Rf_rlogis(arg1: f64, arg2: f64) -> f64; - #[doc = "Non-central Beta Distribution"] pub fn Rf_dnbeta( arg1: f64, arg2: f64, @@ -4407,7 +2401,6 @@ extern "C" { arg6: ::std::os::raw::c_int, ) -> f64; pub fn Rf_rnbeta(arg1: f64, arg2: f64, arg3: f64) -> f64; - #[doc = "Non-central F Distribution"] pub fn Rf_dnf(arg1: f64, arg2: f64, arg3: f64, arg4: f64, arg5: ::std::os::raw::c_int) -> f64; pub fn Rf_pnf( arg1: f64, @@ -4425,7 +2418,6 @@ extern "C" { arg5: ::std::os::raw::c_int, arg6: ::std::os::raw::c_int, ) -> f64; - #[doc = "Non-central Student t Distribution"] pub fn Rf_dnt(arg1: f64, arg2: f64, arg3: f64, arg4: ::std::os::raw::c_int) -> f64; pub fn Rf_pnt( arg1: f64, @@ -4441,7 +2433,6 @@ extern "C" { arg4: ::std::os::raw::c_int, arg5: ::std::os::raw::c_int, ) -> f64; - #[doc = "Studentized Range Distribution"] pub fn Rf_ptukey( arg1: f64, arg2: f64, @@ -4458,7 +2449,6 @@ extern "C" { arg5: ::std::os::raw::c_int, arg6: ::std::os::raw::c_int, ) -> f64; - #[doc = "Wilcoxon Rank Sum Distribution"] pub fn Rf_dwilcox(arg1: f64, arg2: f64, arg3: f64, arg4: ::std::os::raw::c_int) -> f64; pub fn Rf_pwilcox( arg1: f64, @@ -4476,7 +2466,6 @@ extern "C" { ) -> f64; pub fn Rf_rwilcox(arg1: f64, arg2: f64) -> f64; pub fn wilcox_free(); - #[doc = "Wilcoxon Signed Rank Distribution"] pub fn Rf_dsignrank(arg1: f64, arg2: f64, arg3: ::std::os::raw::c_int) -> f64; pub fn Rf_psignrank( arg1: f64, @@ -4492,7 +2481,6 @@ extern "C" { ) -> f64; pub fn Rf_rsignrank(arg1: f64) -> f64; pub fn signrank_free(); - #[doc = "Gamma and Related Functions"] pub fn Rf_gammafn(arg1: f64) -> f64; pub fn Rf_lgammafn(arg1: f64) -> f64; pub fn Rf_lgammafn_sign(arg1: f64, arg2: *mut ::std::os::raw::c_int) -> f64; @@ -4514,7 +2502,6 @@ extern "C" { pub fn Rf_lbeta(arg1: f64, arg2: f64) -> f64; pub fn Rf_choose(arg1: f64, arg2: f64) -> f64; pub fn Rf_lchoose(arg1: f64, arg2: f64) -> f64; - #[doc = "Bessel Functions"] pub fn Rf_bessel_i(arg1: f64, arg2: f64, arg3: f64) -> f64; pub fn Rf_bessel_j(arg1: f64, arg2: f64) -> f64; pub fn Rf_bessel_k(arg1: f64, arg2: f64, arg3: f64) -> f64; @@ -4523,7 +2510,6 @@ extern "C" { pub fn Rf_bessel_j_ex(arg1: f64, arg2: f64, arg3: *mut f64) -> f64; pub fn Rf_bessel_k_ex(arg1: f64, arg2: f64, arg3: f64, arg4: *mut f64) -> f64; pub fn Rf_bessel_y_ex(arg1: f64, arg2: f64, arg3: *mut f64) -> f64; - #[doc = "General Support Functions"] pub fn Rf_imax2( arg1: ::std::os::raw::c_int, arg2: ::std::os::raw::c_int, @@ -4667,22 +2653,15 @@ extern "C" { pub fn R_set_altlist_Set_elt_method(cls: R_altrep_class_t, fun: R_altlist_Set_elt_method_t); pub fn R_GE_getVersion() -> ::std::os::raw::c_int; pub fn R_GE_checkVersionOrDie(version: ::std::os::raw::c_int); - #[doc = "Properly declared version of devNumber"] pub fn Rf_ndevNumber(arg1: pDevDesc) -> ::std::os::raw::c_int; - #[doc = "How many devices exist ? (>= 1)"] pub fn Rf_NumDevices() -> ::std::os::raw::c_int; #[doc = "Check for an available device slot"] pub fn R_CheckDeviceAvailable(); pub fn R_CheckDeviceAvailableBool() -> Rboolean; - #[doc = "Return the number of the current device."] pub fn Rf_curDevice() -> ::std::os::raw::c_int; - #[doc = "Return the number of the next device."] pub fn Rf_nextDevice(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; - #[doc = "Return the number of the previous device."] pub fn Rf_prevDevice(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; - #[doc = "Make the specified device (specified by number) the current device"] pub fn Rf_selectDevice(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; - #[doc = "Kill device which is identified by number."] pub fn Rf_killDevice(arg1: ::std::os::raw::c_int); pub fn Rf_NoDevices() -> ::std::os::raw::c_int; pub fn Rf_NewFrameConfirm(arg1: pDevDesc); @@ -4699,7 +2678,6 @@ extern "C" { pub static mut R_interrupts_suspended: Rboolean; pub static mut R_interrupts_pending: ::std::os::raw::c_int; pub static mut mbcslocale: Rboolean; - #[doc = "Useful for devices: translates Adobe symbol encoding to UTF-8"] pub fn Rf_AdobeSymbol2utf8( out: *mut ::std::os::raw::c_char, in_: *const ::std::os::raw::c_char, @@ -4717,7 +2695,6 @@ extern "C" { ) -> *const ::std::os::raw::c_char; #[doc = "Translates Unicode point to UTF-8"] pub fn Rf_ucstoutf8(s: *mut ::std::os::raw::c_char, c: ::std::os::raw::c_uint) -> usize; - #[doc = "map DevDesc to enclosing GEDevDesc"] pub fn Rf_desc2GEDesc(dd: pDevDesc) -> pGEDevDesc; pub fn GEdeviceNumber(arg1: pGEDevDesc) -> ::std::os::raw::c_int; pub fn GEgetDevice(arg1: ::std::os::raw::c_int) -> pGEDevDesc; @@ -4747,10 +2724,8 @@ extern "C" { pub fn GEtoDeviceWidth(value: f64, from: GEUnit, dd: pGEDevDesc) -> f64; pub fn GEfromDeviceHeight(value: f64, to: GEUnit, dd: pGEDevDesc) -> f64; pub fn GEtoDeviceHeight(value: f64, from: GEUnit, dd: pGEDevDesc) -> f64; - #[doc = "Convert an element of a R colour specification (which might be a\nnumber or a string) into an internal colour specification."] pub fn Rf_RGBpar(arg1: SEXP, arg2: ::std::os::raw::c_int) -> rcolor; pub fn Rf_RGBpar3(arg1: SEXP, arg2: ::std::os::raw::c_int, arg3: rcolor) -> rcolor; - #[doc = "Convert an internal colour specification to/from a colour name"] pub fn Rf_col2name(col: rcolor) -> *const ::std::os::raw::c_char; #[doc = "Convert either a name or a #RRGGBB\\[AA\\] string to internal.\nBecause people were using it, it also converts \"1\", \"2\" ...\nto a colour in the palette, and \"0\" to transparent white."] pub fn R_GE_str2col(s: *const ::std::os::raw::c_char) -> rcolor; diff --git a/bindings/bindings-macos-x86_64-R4.4-devel.rs b/bindings/bindings-macos-x86_64-R4.4-devel.rs index 9c3bc2dc..e9088ccc 100644 --- a/bindings/bindings-macos-x86_64-R4.4-devel.rs +++ b/bindings/bindings-macos-x86_64-R4.4-devel.rs @@ -1,8 +1,8 @@ /* automatically generated by rust-bindgen 0.69.1 */ /* libR-sys version: 0.6.0 */ -/* bindgen clang version: Homebrew clang version 17.0.3 */ -/* clang-rs version: Homebrew clang version 17.0.3 */ +/* bindgen clang version: Homebrew clang version 17.0.2 */ +/* clang-rs version: Homebrew clang version 17.0.2 */ /* r version: 4.4.0-devel */ #[repr(C)] @@ -251,41 +251,6 @@ pub struct __sbuf { pub _base: *mut ::std::os::raw::c_uchar, pub _size: ::std::os::raw::c_int, } -#[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, - concat!("Size of: ", stringify!(__sbuf)) - ); - assert_eq!( - ::std::mem::align_of::<__sbuf>(), - 8usize, - concat!("Alignment of ", stringify!(__sbuf)) - ); - 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)] pub struct __sFILEX { @@ -335,221 +300,6 @@ pub struct __sFILE { pub _blksize: ::std::os::raw::c_int, pub _offset: fpos_t, } -#[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, - concat!("Size of: ", stringify!(__sFILE)) - ); - assert_eq!( - ::std::mem::align_of::<__sFILE>(), - 8usize, - concat!("Alignment of ", stringify!(__sFILE)) - ); - 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; #[doc = ", MAYBE"] pub const Rboolean_FALSE: Rboolean = 0; @@ -568,61 +318,6 @@ pub struct R_CMethodDef { pub numArgs: ::std::os::raw::c_int, pub types: *mut R_NativePrimitiveArgType, } -#[test] -fn bindgen_test_layout_R_CMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(R_CMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(numArgs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).types) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(types) - ) - ); -} #[doc = "These are very similar to those in Rdynpriv.h,\nbut we maintain them separately to give us more freedom to do\nsome computations on the internal versions that are derived from\nthese definitions."] pub type R_FortranMethodDef = R_CMethodDef; #[repr(C)] @@ -632,51 +327,6 @@ pub struct R_CallMethodDef { pub fun: DL_FUNC, pub numArgs: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_R_CallMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(numArgs) - ) - ); -} pub type R_ExternalMethodDef = R_CallMethodDef; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -758,91 +408,6 @@ pub struct R_outpstream_st { ::std::option::Option SEXP>, pub OutPersistHookData: SEXP, } -#[test] -fn bindgen_test_layout_R_outpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(R_outpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_outpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookData) - ) - ); -} pub type R_inpstream_t = *mut R_inpstream_st; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -865,142 +430,12 @@ pub struct R_inpstream_st { pub nat2nat_obj: *mut ::std::os::raw::c_void, pub nat2utf8_obj: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_R_inpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(R_inpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_inpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).native_encoding) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(native_encoding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2nat_obj) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2nat_obj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2utf8_obj) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2utf8_obj) - ) - ); -} #[doc = "try to allow some type checking"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct R_hashtab_type { pub cell: SEXP, } -#[test] -fn bindgen_test_layout_R_hashtab_type() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_hashtab_type)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_hashtab_type)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cell) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_hashtab_type), - "::", - stringify!(cell) - ) - ); -} #[doc = "= 0"] pub const SA_TYPE_SA_NORESTORE: SA_TYPE = 0; pub const SA_TYPE_SA_RESTORE: SA_TYPE = 1; @@ -1033,171 +468,6 @@ pub struct structRstart { pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub nconnections: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_structRstart() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(structRstart)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(structRstart)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Quiet) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Quiet) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_NoEcho) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_NoEcho) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Interactive) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Interactive) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).R_Verbose) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(R_Verbose) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadSiteFile) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadSiteFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LoadInitFile) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(LoadInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DebugInitFile) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(DebugInitFile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RestoreAction) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(RestoreAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).SaveAction) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(SaveAction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vsize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nsize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_vsize) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_vsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_nsize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(max_nsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ppsize) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(ppsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nconnections) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(structRstart), - "::", - stringify!(nconnections) - ) - ); -} impl structRstart { #[inline] pub fn NoRenviron(&self) -> Rboolean { @@ -1251,31 +521,6 @@ pub type ParseStatus = u32; pub struct R_altrep_class_t { pub ptr: SEXP, } -#[test] -fn bindgen_test_layout_R_altrep_class_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_altrep_class_t), - "::", - stringify!(ptr) - ) - ); -} pub type R_altrep_UnserializeEX_method_t = ::std::option::Option< unsafe extern "C" fn( arg1: SEXP, @@ -1469,161 +714,6 @@ pub struct R_GE_gcontext { #[doc = "Reference to a pattern fill"] pub patternFill: SEXP, } -#[test] -fn bindgen_test_layout_R_GE_gcontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 288usize, - concat!("Size of: ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).col) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(col) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lwd) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lwd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lty) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lend) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lend) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ljoin) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ljoin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lmitre) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lmitre) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cex) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(cex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ps) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lineheight) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lineheight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontface) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontfamily) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontfamily) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).patternFill) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(patternFill) - ) - ); -} pub type pGEcontext = *mut R_GE_gcontext; #[doc = "--------- New (in 1.4.0) device driver structure ---------\n NOTES:\n 1. All locations and dimensions are in device coordinates.\n 2. I found this comment in the doc for dev_Open -- looks nasty\n Any known instances of such a thing happening? Should be\n replaced by a function to query the device for preferred gpars\n settings? (to be called when the device is initialised)\n\n NOTE that it is perfectly acceptable for this\n function to set generic graphics parameters too\n (i.e., override the generic parameter settings\n which GInit sets up) all at the author's own risk\n of course :)\n\n 3. Do we really need dev_StrWidth as well as dev_MetricInfo?\n I can see the difference between the two -- its just a\n question of whether dev_MetricInfo should just return\n what dev_StrWidth would give if font metric information is\n not available. I guess having both allows the developer\n to decide when to ask for which sort of value, and to decide\n what to do when font metric information is not available.\n And why not a dev_StrHeight?\n 4. Should \"ipr\", \"asp\", and \"cra\" be in the device description?\n If not, then where?\n I guess they don't need to be if no device makes use of them.\n On the other hand, they would need to be replaced by a device\n call that R base graphics could use to get enough information\n to figure them out. (e.g., some sort of dpi() function to\n complement the size() function.)"] pub type DevDesc = _DevDesc; @@ -1885,851 +975,6 @@ pub struct _DevDesc { #[doc = "Area for future expansion.\nBy zeroing this, devices are more likely to work if loaded\ninto a later version of R than that they were compiled under."] pub reserved: [::std::os::raw::c_char; 64usize], } -#[test] -fn bindgen_test_layout__DevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_DevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_DevDesc>(), - 656usize, - concat!("Size of: ", stringify!(_DevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_DevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_DevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(bottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipLeft) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipLeft) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipRight) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipRight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipBottom) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipBottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipTop) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipTop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xCharOffset) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(xCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yCharOffset) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yLineBias) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yLineBias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ipr) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(ipr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cra) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cra) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canClip) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canChangeGamma) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canChangeGamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canHAdj) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canHAdj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startps) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startcol) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startcol) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfill) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startlty) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startlty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfont) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfont) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startgamma) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startgamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceSpecific) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseDown) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseDown) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseMove) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseMove) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseUp) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseUp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenKeybd) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenKeybd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenIdle) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenIdle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gettingEvent) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gettingEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).activate) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(activate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).circle) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(circle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clip) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deactivate) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deactivate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).locator) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(locator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metricInfo) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(metricInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newPage) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newPage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polygon) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polygon) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polyline) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polyline) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rect) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(rect) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).path) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(path) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).raster) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(raster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cap) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cap) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidth) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onExit) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(onExit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getEvent) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(getEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newFrameConfirm) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newFrameConfirm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasTextUTF8) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(hasTextUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).textUTF8) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(textUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidthUTF8) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidthUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wantSymbolUTF8) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(wantSymbolUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useRotatedTextInContour) as usize - ptr as usize }, - 420usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useRotatedTextInContour) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventEnv) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventEnv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventHelper) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventHelper) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).holdflush) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(holdflush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparency) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparency) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparentBg) as usize - ptr as usize }, - 452usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparentBg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveRaster) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveRaster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveCapture) as usize - ptr as usize }, - 460usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveCapture) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveLocator) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveLocator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setPattern) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setPattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releasePattern) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releasePattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setClipPath) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseClipPath) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setMask) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseMask) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceVersion) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceClip) as usize - ptr as usize }, - 524usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).defineGroup) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(defineGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useGroup) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseGroup) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stroke) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(stroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fillStroke) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fillStroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(capabilities) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).glyph) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(glyph) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(reserved) - ) - ); -} pub const R_KeyName_knUNKNOWN: R_KeyName = -1; pub const R_KeyName_knLEFT: R_KeyName = 0; pub const R_KeyName_knUP: R_KeyName = 1; @@ -2772,41 +1017,6 @@ pub struct GESystemDesc { #[doc = "An array of function pointers, one per graphics system that\n has registered with the graphics engine.\n\n system_Callback is called when the graphics engine wants\n to give a graphics system the chance to play with its\n device-specific information (stored in systemSpecific)\n There are two parameters: an \"event\" to tell the graphics\n system why the graphics engine has called this function,\n and the systemSpecific pointer. The graphics engine\n has to pass the systemSpecific pointer because only\n the graphics engine will know what array index to use."] pub callback: GEcallback, } -#[test] -fn bindgen_test_layout_GESystemDesc() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(GESystemDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GESystemDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).systemSpecific) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(systemSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(callback) - ) - ); -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GEDevDesc { @@ -2831,121 +1041,6 @@ pub struct _GEDevDesc { #[doc = "Is a device appending a path ?"] pub appending: Rboolean, } -#[test] -fn bindgen_test_layout__GEDevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_GEDevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_GEDevDesc>(), - 248usize, - concat!("Size of: ", stringify!(_GEDevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_GEDevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_GEDevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dev) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dev) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayList) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DLlastElt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(DLlastElt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).savedSnapshot) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(savedSnapshot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dirty) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dirty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).recordGraphics) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(recordGraphics) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gesd) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(gesd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ask) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(ask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).appending) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(appending) - ) - ); -} pub type pGEDevDesc = *mut GEDevDesc; #[doc = "-------------------------------------------------------------------\n\n COLOUR CODE is concerned with the internals of R colour representation\n\n From colors.c, used in par.c, grid/src/gpar.c"] pub type rcolor = ::std::os::raw::c_uint; @@ -3017,41 +1112,6 @@ pub struct Rcomplex { pub r: f64, pub i: f64, } -#[test] -fn bindgen_test_layout_Rcomplex() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(Rcomplex)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Rcomplex)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(r) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(i) - ) - ); -} pub type __builtin_va_list = [__va_list_tag; 1usize]; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -3061,61 +1121,6 @@ pub struct __va_list_tag { pub overflow_arg_area: *mut ::std::os::raw::c_void, pub reg_save_area: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout___va_list_tag() { - const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} extern "C" { #[doc = "IEEE NaN"] pub static mut R_NaN: f64; diff --git a/bindings/bindings-windows-x86_64-R4.2.rs b/bindings/bindings-windows-x86_64-R4.2.rs index ba3f1845..47d14573 100644 --- a/bindings/bindings-windows-x86_64-R4.2.rs +++ b/bindings/bindings-windows-x86_64-R4.2.rs @@ -157,31 +157,6 @@ pub type R_xlen_t = isize; pub struct _iobuf { pub _Placeholder: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout__iobuf() { - const UNINIT: ::std::mem::MaybeUninit<_iobuf> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_iobuf>(), - 8usize, - concat!("Size of: ", stringify!(_iobuf)) - ); - assert_eq!( - ::std::mem::align_of::<_iobuf>(), - 8usize, - concat!("Alignment of ", stringify!(_iobuf)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._Placeholder) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_iobuf), - "::", - stringify!(_Placeholder) - ) - ); -} pub type FILE = _iobuf; #[doc = ", MAYBE"] pub const Rboolean_FALSE: Rboolean = 0; @@ -200,61 +175,6 @@ pub struct R_CMethodDef { pub numArgs: ::std::os::raw::c_int, pub types: *mut R_NativePrimitiveArgType, } -#[test] -fn bindgen_test_layout_R_CMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(R_CMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(numArgs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).types) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(types) - ) - ); -} #[doc = "These are very similar to those in Rdynpriv.h,\nbut we maintain them separately to give us more freedom to do\nsome computations on the internal versions that are derived from\nthese definitions."] pub type R_FortranMethodDef = R_CMethodDef; #[repr(C)] @@ -264,51 +184,6 @@ pub struct R_CallMethodDef { pub fun: DL_FUNC, pub numArgs: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_R_CallMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(numArgs) - ) - ); -} pub type R_ExternalMethodDef = R_CallMethodDef; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -390,91 +265,6 @@ pub struct R_outpstream_st { ::std::option::Option SEXP>, pub OutPersistHookData: SEXP, } -#[test] -fn bindgen_test_layout_R_outpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(R_outpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_outpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookData) - ) - ); -} pub type R_inpstream_t = *mut R_inpstream_st; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -497,142 +287,12 @@ pub struct R_inpstream_st { pub nat2nat_obj: *mut ::std::os::raw::c_void, pub nat2utf8_obj: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_R_inpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(R_inpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_inpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).native_encoding) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(native_encoding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2nat_obj) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2nat_obj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2utf8_obj) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2utf8_obj) - ) - ); -} #[doc = "try to allow some type checking"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct R_hashtab_type { pub cell: SEXP, } -#[test] -fn bindgen_test_layout_R_hashtab_type() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_hashtab_type)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_hashtab_type)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cell) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_hashtab_type), - "::", - stringify!(cell) - ) - ); -} pub const ParseStatus_PARSE_NULL: ParseStatus = 0; pub const ParseStatus_PARSE_OK: ParseStatus = 1; pub const ParseStatus_PARSE_INCOMPLETE: ParseStatus = 2; @@ -645,31 +305,6 @@ pub type ParseStatus = u32; pub struct R_altrep_class_t { pub ptr: SEXP, } -#[test] -fn bindgen_test_layout_R_altrep_class_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_altrep_class_t), - "::", - stringify!(ptr) - ) - ); -} pub type R_altrep_UnserializeEX_method_t = ::std::option::Option< unsafe extern "C" fn( arg1: SEXP, @@ -859,161 +494,6 @@ pub struct R_GE_gcontext { #[doc = "Reference to a pattern fill"] pub patternFill: SEXP, } -#[test] -fn bindgen_test_layout_R_GE_gcontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 288usize, - concat!("Size of: ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).col) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(col) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lwd) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lwd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lty) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lend) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lend) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ljoin) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ljoin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lmitre) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lmitre) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cex) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(cex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ps) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lineheight) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lineheight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontface) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontfamily) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontfamily) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).patternFill) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(patternFill) - ) - ); -} pub type pGEcontext = *mut R_GE_gcontext; #[doc = "--------- New (in 1.4.0) device driver structure ---------\n NOTES:\n 1. All locations and dimensions are in device coordinates.\n 2. I found this comment in the doc for dev_Open -- looks nasty\n Any known instances of such a thing happening? Should be\n replaced by a function to query the device for preferred gpars\n settings? (to be called when the device is initialised)\n\n NOTE that it is perfectly acceptable for this\n function to set generic graphics parameters too\n (i.e., override the generic parameter settings\n which GInit sets up) all at the author's own risk\n of course :)\n\n 3. Do we really need dev_StrWidth as well as dev_MetricInfo?\n I can see the difference between the two -- its just a\n question of whether dev_MetricInfo should just return\n what dev_StrWidth would give if font metric information is\n not available. I guess having both allows the developer\n to decide when to ask for which sort of value, and to decide\n what to do when font metric information is not available.\n And why not a dev_StrHeight?\n 4. Should \"ipr\", \"asp\", and \"cra\" be in the device description?\n If not, then where?\n I guess they don't need to be if no device makes use of them.\n On the other hand, they would need to be replaced by a device\n call that R base graphics could use to get enough information\n to figure them out. (e.g., some sort of dpi() function to\n complement the size() function.)"] pub type DevDesc = _DevDesc; @@ -1262,841 +742,6 @@ pub struct _DevDesc { #[doc = "Area for future expansion.\nBy zeroing this, devices are more likely to work if loaded\ninto a later version of R than that they were compiled under."] pub reserved: [::std::os::raw::c_char; 64usize], } -#[test] -fn bindgen_test_layout__DevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_DevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_DevDesc>(), - 648usize, - concat!("Size of: ", stringify!(_DevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_DevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_DevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(bottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipLeft) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipLeft) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipRight) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipRight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipBottom) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipBottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipTop) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipTop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xCharOffset) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(xCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yCharOffset) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yLineBias) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yLineBias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ipr) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(ipr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cra) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cra) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canClip) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canChangeGamma) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canChangeGamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canHAdj) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canHAdj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startps) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startcol) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startcol) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfill) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startlty) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startlty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfont) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfont) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startgamma) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startgamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceSpecific) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseDown) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseDown) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseMove) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseMove) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseUp) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseUp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenKeybd) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenKeybd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenIdle) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenIdle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gettingEvent) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gettingEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).activate) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(activate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).circle) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(circle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clip) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deactivate) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deactivate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).locator) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(locator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metricInfo) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(metricInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newPage) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newPage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polygon) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polygon) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polyline) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polyline) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rect) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(rect) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).path) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(path) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).raster) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(raster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cap) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cap) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidth) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onExit) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(onExit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getEvent) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(getEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newFrameConfirm) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newFrameConfirm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasTextUTF8) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(hasTextUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).textUTF8) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(textUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidthUTF8) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidthUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wantSymbolUTF8) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(wantSymbolUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useRotatedTextInContour) as usize - ptr as usize }, - 420usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useRotatedTextInContour) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventEnv) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventEnv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventHelper) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventHelper) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).holdflush) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(holdflush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparency) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparency) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparentBg) as usize - ptr as usize }, - 452usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparentBg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveRaster) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveRaster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveCapture) as usize - ptr as usize }, - 460usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveCapture) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveLocator) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveLocator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setPattern) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setPattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releasePattern) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releasePattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setClipPath) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseClipPath) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setMask) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseMask) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceVersion) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceClip) as usize - ptr as usize }, - 524usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).defineGroup) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(defineGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useGroup) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseGroup) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stroke) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(stroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fillStroke) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fillStroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(capabilities) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(reserved) - ) - ); -} pub const R_KeyName_knUNKNOWN: R_KeyName = -1; pub const R_KeyName_knLEFT: R_KeyName = 0; pub const R_KeyName_knUP: R_KeyName = 1; @@ -2139,41 +784,6 @@ pub struct GESystemDesc { #[doc = "An array of function pointers, one per graphics system that\n has registered with the graphics engine.\n\n system_Callback is called when the graphics engine wants\n to give a graphics system the chance to play with its\n device-specific information (stored in systemSpecific)\n There are two parameters: an \"event\" to tell the graphics\n system why the graphics engine has called this function,\n and the systemSpecific pointer. The graphics engine\n has to pass the systemSpecific pointer because only\n the graphics engine will know what array index to use."] pub callback: GEcallback, } -#[test] -fn bindgen_test_layout_GESystemDesc() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(GESystemDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GESystemDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).systemSpecific) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(systemSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(callback) - ) - ); -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GEDevDesc { @@ -2198,121 +808,6 @@ pub struct _GEDevDesc { #[doc = "Is a device appending a path ?"] pub appending: Rboolean, } -#[test] -fn bindgen_test_layout__GEDevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_GEDevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_GEDevDesc>(), - 248usize, - concat!("Size of: ", stringify!(_GEDevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_GEDevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_GEDevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dev) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dev) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayList) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DLlastElt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(DLlastElt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).savedSnapshot) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(savedSnapshot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dirty) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dirty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).recordGraphics) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(recordGraphics) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gesd) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(gesd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ask) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(ask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).appending) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(appending) - ) - ); -} pub type pGEDevDesc = *mut GEDevDesc; #[doc = "-------------------------------------------------------------------\n\n COLOUR CODE is concerned with the internals of R colour representation\n\n From colors.c, used in par.c, grid/src/gpar.c"] pub type rcolor = ::std::os::raw::c_uint; @@ -2384,41 +879,6 @@ pub struct Rcomplex { pub r: f64, pub i: f64, } -#[test] -fn bindgen_test_layout_Rcomplex() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(Rcomplex)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Rcomplex)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(r) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(i) - ) - ); -} pub type __builtin_va_list = *mut ::std::os::raw::c_char; extern "C" { #[doc = "IEEE NaN"] diff --git a/bindings/bindings-windows-x86_64-R4.3.rs b/bindings/bindings-windows-x86_64-R4.3.rs index 71561c06..d403f524 100644 --- a/bindings/bindings-windows-x86_64-R4.3.rs +++ b/bindings/bindings-windows-x86_64-R4.3.rs @@ -163,31 +163,6 @@ pub type R_xlen_t = isize; pub struct _iobuf { pub _Placeholder: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout__iobuf() { - const UNINIT: ::std::mem::MaybeUninit<_iobuf> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_iobuf>(), - 8usize, - concat!("Size of: ", stringify!(_iobuf)) - ); - assert_eq!( - ::std::mem::align_of::<_iobuf>(), - 8usize, - concat!("Alignment of ", stringify!(_iobuf)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._Placeholder) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_iobuf), - "::", - stringify!(_Placeholder) - ) - ); -} pub type FILE = _iobuf; #[doc = ", MAYBE"] pub const Rboolean_FALSE: Rboolean = 0; @@ -206,61 +181,6 @@ pub struct R_CMethodDef { pub numArgs: ::std::os::raw::c_int, pub types: *mut R_NativePrimitiveArgType, } -#[test] -fn bindgen_test_layout_R_CMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(R_CMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(numArgs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).types) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(types) - ) - ); -} #[doc = "These are very similar to those in Rdynpriv.h,\nbut we maintain them separately to give us more freedom to do\nsome computations on the internal versions that are derived from\nthese definitions."] pub type R_FortranMethodDef = R_CMethodDef; #[repr(C)] @@ -270,51 +190,6 @@ pub struct R_CallMethodDef { pub fun: DL_FUNC, pub numArgs: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_R_CallMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(numArgs) - ) - ); -} pub type R_ExternalMethodDef = R_CallMethodDef; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -396,91 +271,6 @@ pub struct R_outpstream_st { ::std::option::Option SEXP>, pub OutPersistHookData: SEXP, } -#[test] -fn bindgen_test_layout_R_outpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(R_outpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_outpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookData) - ) - ); -} pub type R_inpstream_t = *mut R_inpstream_st; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -503,142 +293,12 @@ pub struct R_inpstream_st { pub nat2nat_obj: *mut ::std::os::raw::c_void, pub nat2utf8_obj: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_R_inpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(R_inpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_inpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).native_encoding) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(native_encoding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2nat_obj) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2nat_obj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2utf8_obj) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2utf8_obj) - ) - ); -} #[doc = "try to allow some type checking"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct R_hashtab_type { pub cell: SEXP, } -#[test] -fn bindgen_test_layout_R_hashtab_type() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_hashtab_type)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_hashtab_type)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cell) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_hashtab_type), - "::", - stringify!(cell) - ) - ); -} pub const ParseStatus_PARSE_NULL: ParseStatus = 0; pub const ParseStatus_PARSE_OK: ParseStatus = 1; pub const ParseStatus_PARSE_INCOMPLETE: ParseStatus = 2; @@ -651,31 +311,6 @@ pub type ParseStatus = u32; pub struct R_altrep_class_t { pub ptr: SEXP, } -#[test] -fn bindgen_test_layout_R_altrep_class_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_altrep_class_t), - "::", - stringify!(ptr) - ) - ); -} pub type R_altrep_UnserializeEX_method_t = ::std::option::Option< unsafe extern "C" fn( arg1: SEXP, @@ -869,161 +504,6 @@ pub struct R_GE_gcontext { #[doc = "Reference to a pattern fill"] pub patternFill: SEXP, } -#[test] -fn bindgen_test_layout_R_GE_gcontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 288usize, - concat!("Size of: ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).col) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(col) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lwd) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lwd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lty) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lend) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lend) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ljoin) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ljoin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lmitre) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lmitre) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cex) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(cex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ps) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lineheight) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lineheight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontface) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontfamily) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontfamily) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).patternFill) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(patternFill) - ) - ); -} pub type pGEcontext = *mut R_GE_gcontext; #[doc = "--------- New (in 1.4.0) device driver structure ---------\n NOTES:\n 1. All locations and dimensions are in device coordinates.\n 2. I found this comment in the doc for dev_Open -- looks nasty\n Any known instances of such a thing happening? Should be\n replaced by a function to query the device for preferred gpars\n settings? (to be called when the device is initialised)\n\n NOTE that it is perfectly acceptable for this\n function to set generic graphics parameters too\n (i.e., override the generic parameter settings\n which GInit sets up) all at the author's own risk\n of course :)\n\n 3. Do we really need dev_StrWidth as well as dev_MetricInfo?\n I can see the difference between the two -- its just a\n question of whether dev_MetricInfo should just return\n what dev_StrWidth would give if font metric information is\n not available. I guess having both allows the developer\n to decide when to ask for which sort of value, and to decide\n what to do when font metric information is not available.\n And why not a dev_StrHeight?\n 4. Should \"ipr\", \"asp\", and \"cra\" be in the device description?\n If not, then where?\n I guess they don't need to be if no device makes use of them.\n On the other hand, they would need to be replaced by a device\n call that R base graphics could use to get enough information\n to figure them out. (e.g., some sort of dpi() function to\n complement the size() function.)"] pub type DevDesc = _DevDesc; @@ -1285,851 +765,6 @@ pub struct _DevDesc { #[doc = "Area for future expansion.\nBy zeroing this, devices are more likely to work if loaded\ninto a later version of R than that they were compiled under."] pub reserved: [::std::os::raw::c_char; 64usize], } -#[test] -fn bindgen_test_layout__DevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_DevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_DevDesc>(), - 656usize, - concat!("Size of: ", stringify!(_DevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_DevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_DevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(bottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipLeft) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipLeft) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipRight) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipRight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipBottom) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipBottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipTop) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipTop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xCharOffset) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(xCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yCharOffset) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yLineBias) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yLineBias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ipr) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(ipr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cra) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cra) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canClip) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canChangeGamma) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canChangeGamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canHAdj) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canHAdj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startps) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startcol) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startcol) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfill) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startlty) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startlty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfont) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfont) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startgamma) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startgamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceSpecific) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseDown) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseDown) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseMove) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseMove) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseUp) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseUp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenKeybd) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenKeybd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenIdle) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenIdle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gettingEvent) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gettingEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).activate) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(activate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).circle) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(circle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clip) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deactivate) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deactivate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).locator) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(locator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metricInfo) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(metricInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newPage) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newPage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polygon) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polygon) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polyline) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polyline) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rect) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(rect) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).path) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(path) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).raster) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(raster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cap) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cap) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidth) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onExit) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(onExit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getEvent) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(getEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newFrameConfirm) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newFrameConfirm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasTextUTF8) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(hasTextUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).textUTF8) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(textUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidthUTF8) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidthUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wantSymbolUTF8) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(wantSymbolUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useRotatedTextInContour) as usize - ptr as usize }, - 420usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useRotatedTextInContour) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventEnv) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventEnv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventHelper) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventHelper) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).holdflush) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(holdflush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparency) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparency) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparentBg) as usize - ptr as usize }, - 452usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparentBg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveRaster) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveRaster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveCapture) as usize - ptr as usize }, - 460usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveCapture) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveLocator) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveLocator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setPattern) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setPattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releasePattern) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releasePattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setClipPath) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseClipPath) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setMask) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseMask) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceVersion) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceClip) as usize - ptr as usize }, - 524usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).defineGroup) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(defineGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useGroup) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseGroup) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stroke) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(stroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fillStroke) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fillStroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(capabilities) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).glyph) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(glyph) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(reserved) - ) - ); -} pub const R_KeyName_knUNKNOWN: R_KeyName = -1; pub const R_KeyName_knLEFT: R_KeyName = 0; pub const R_KeyName_knUP: R_KeyName = 1; @@ -2172,41 +807,6 @@ pub struct GESystemDesc { #[doc = "An array of function pointers, one per graphics system that\n has registered with the graphics engine.\n\n system_Callback is called when the graphics engine wants\n to give a graphics system the chance to play with its\n device-specific information (stored in systemSpecific)\n There are two parameters: an \"event\" to tell the graphics\n system why the graphics engine has called this function,\n and the systemSpecific pointer. The graphics engine\n has to pass the systemSpecific pointer because only\n the graphics engine will know what array index to use."] pub callback: GEcallback, } -#[test] -fn bindgen_test_layout_GESystemDesc() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(GESystemDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GESystemDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).systemSpecific) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(systemSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(callback) - ) - ); -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GEDevDesc { @@ -2231,121 +831,6 @@ pub struct _GEDevDesc { #[doc = "Is a device appending a path ?"] pub appending: Rboolean, } -#[test] -fn bindgen_test_layout__GEDevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_GEDevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_GEDevDesc>(), - 248usize, - concat!("Size of: ", stringify!(_GEDevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_GEDevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_GEDevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dev) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dev) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayList) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DLlastElt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(DLlastElt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).savedSnapshot) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(savedSnapshot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dirty) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dirty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).recordGraphics) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(recordGraphics) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gesd) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(gesd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ask) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(ask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).appending) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(appending) - ) - ); -} pub type pGEDevDesc = *mut GEDevDesc; #[doc = "-------------------------------------------------------------------\n\n COLOUR CODE is concerned with the internals of R colour representation\n\n From colors.c, used in par.c, grid/src/gpar.c"] pub type rcolor = ::std::os::raw::c_uint; @@ -2417,41 +902,6 @@ pub struct Rcomplex { pub r: f64, pub i: f64, } -#[test] -fn bindgen_test_layout_Rcomplex() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(Rcomplex)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Rcomplex)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(r) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(i) - ) - ); -} pub type __builtin_va_list = *mut ::std::os::raw::c_char; extern "C" { #[doc = "IEEE NaN"] diff --git a/bindings/bindings-windows-x86_64-R4.4-devel.rs b/bindings/bindings-windows-x86_64-R4.4-devel.rs index b4afc5b2..d132bc36 100644 --- a/bindings/bindings-windows-x86_64-R4.4-devel.rs +++ b/bindings/bindings-windows-x86_64-R4.4-devel.rs @@ -164,31 +164,6 @@ pub type R_xlen_t = isize; pub struct _iobuf { pub _Placeholder: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout__iobuf() { - const UNINIT: ::std::mem::MaybeUninit<_iobuf> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_iobuf>(), - 8usize, - concat!("Size of: ", stringify!(_iobuf)) - ); - assert_eq!( - ::std::mem::align_of::<_iobuf>(), - 8usize, - concat!("Alignment of ", stringify!(_iobuf)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._Placeholder) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_iobuf), - "::", - stringify!(_Placeholder) - ) - ); -} pub type FILE = _iobuf; #[doc = ", MAYBE"] pub const Rboolean_FALSE: Rboolean = 0; @@ -207,61 +182,6 @@ pub struct R_CMethodDef { pub numArgs: ::std::os::raw::c_int, pub types: *mut R_NativePrimitiveArgType, } -#[test] -fn bindgen_test_layout_R_CMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(R_CMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(numArgs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).types) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_CMethodDef), - "::", - stringify!(types) - ) - ); -} #[doc = "These are very similar to those in Rdynpriv.h,\nbut we maintain them separately to give us more freedom to do\nsome computations on the internal versions that are derived from\nthese definitions."] pub type R_FortranMethodDef = R_CMethodDef; #[repr(C)] @@ -271,51 +191,6 @@ pub struct R_CallMethodDef { pub fun: DL_FUNC, pub numArgs: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_R_CallMethodDef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_CallMethodDef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fun) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(fun) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).numArgs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_CallMethodDef), - "::", - stringify!(numArgs) - ) - ); -} pub type R_ExternalMethodDef = R_CallMethodDef; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -397,91 +272,6 @@ pub struct R_outpstream_st { ::std::option::Option SEXP>, pub OutPersistHookData: SEXP, } -#[test] -fn bindgen_test_layout_R_outpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(R_outpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_outpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OutPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_outpstream_st), - "::", - stringify!(OutPersistHookData) - ) - ); -} pub type R_inpstream_t = *mut R_inpstream_st; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -504,142 +294,12 @@ pub struct R_inpstream_st { pub nat2nat_obj: *mut ::std::os::raw::c_void, pub nat2utf8_obj: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_R_inpstream_st() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(R_inpstream_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_inpstream_st)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InChar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InBytes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InBytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookFunc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookFunc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).InPersistHookData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(InPersistHookData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).native_encoding) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(native_encoding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2nat_obj) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2nat_obj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nat2utf8_obj) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(R_inpstream_st), - "::", - stringify!(nat2utf8_obj) - ) - ); -} #[doc = "try to allow some type checking"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct R_hashtab_type { pub cell: SEXP, } -#[test] -fn bindgen_test_layout_R_hashtab_type() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_hashtab_type)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_hashtab_type)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cell) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_hashtab_type), - "::", - stringify!(cell) - ) - ); -} pub const ParseStatus_PARSE_NULL: ParseStatus = 0; pub const ParseStatus_PARSE_OK: ParseStatus = 1; pub const ParseStatus_PARSE_INCOMPLETE: ParseStatus = 2; @@ -652,31 +312,6 @@ pub type ParseStatus = u32; pub struct R_altrep_class_t { pub ptr: SEXP, } -#[test] -fn bindgen_test_layout_R_altrep_class_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_altrep_class_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_altrep_class_t), - "::", - stringify!(ptr) - ) - ); -} pub type R_altrep_UnserializeEX_method_t = ::std::option::Option< unsafe extern "C" fn( arg1: SEXP, @@ -870,161 +505,6 @@ pub struct R_GE_gcontext { #[doc = "Reference to a pattern fill"] pub patternFill: SEXP, } -#[test] -fn bindgen_test_layout_R_GE_gcontext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 288usize, - concat!("Size of: ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(R_GE_gcontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).col) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(col) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lwd) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lwd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lty) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lend) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lend) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ljoin) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ljoin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lmitre) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lmitre) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cex) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(cex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ps) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(ps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lineheight) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(lineheight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontface) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fontfamily) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(fontfamily) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).patternFill) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(R_GE_gcontext), - "::", - stringify!(patternFill) - ) - ); -} pub type pGEcontext = *mut R_GE_gcontext; #[doc = "--------- New (in 1.4.0) device driver structure ---------\n NOTES:\n 1. All locations and dimensions are in device coordinates.\n 2. I found this comment in the doc for dev_Open -- looks nasty\n Any known instances of such a thing happening? Should be\n replaced by a function to query the device for preferred gpars\n settings? (to be called when the device is initialised)\n\n NOTE that it is perfectly acceptable for this\n function to set generic graphics parameters too\n (i.e., override the generic parameter settings\n which GInit sets up) all at the author's own risk\n of course :)\n\n 3. Do we really need dev_StrWidth as well as dev_MetricInfo?\n I can see the difference between the two -- its just a\n question of whether dev_MetricInfo should just return\n what dev_StrWidth would give if font metric information is\n not available. I guess having both allows the developer\n to decide when to ask for which sort of value, and to decide\n what to do when font metric information is not available.\n And why not a dev_StrHeight?\n 4. Should \"ipr\", \"asp\", and \"cra\" be in the device description?\n If not, then where?\n I guess they don't need to be if no device makes use of them.\n On the other hand, they would need to be replaced by a device\n call that R base graphics could use to get enough information\n to figure them out. (e.g., some sort of dpi() function to\n complement the size() function.)"] pub type DevDesc = _DevDesc; @@ -1286,851 +766,6 @@ pub struct _DevDesc { #[doc = "Area for future expansion.\nBy zeroing this, devices are more likely to work if loaded\ninto a later version of R than that they were compiled under."] pub reserved: [::std::os::raw::c_char; 64usize], } -#[test] -fn bindgen_test_layout__DevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_DevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_DevDesc>(), - 656usize, - concat!("Size of: ", stringify!(_DevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_DevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_DevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(bottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipLeft) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipLeft) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipRight) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipRight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipBottom) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipBottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clipTop) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clipTop) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).xCharOffset) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(xCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yCharOffset) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yCharOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yLineBias) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(yLineBias) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ipr) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(ipr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cra) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cra) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gamma) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canClip) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canChangeGamma) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canChangeGamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canHAdj) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canHAdj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startps) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startcol) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startcol) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfill) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startlty) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startlty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startfont) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startfont) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).startgamma) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(startgamma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceSpecific) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseDown) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseDown) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseMove) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseMove) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenMouseUp) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenMouseUp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenKeybd) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenKeybd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).canGenIdle) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(canGenIdle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gettingEvent) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(gettingEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).activate) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(activate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).circle) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(circle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clip) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(clip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deactivate) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deactivate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).locator) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(locator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metricInfo) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(metricInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newPage) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newPage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polygon) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polygon) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).polyline) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(polyline) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rect) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(rect) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).path) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(path) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).raster) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(raster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cap) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(cap) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidth) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).onExit) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(onExit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getEvent) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(getEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).newFrameConfirm) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(newFrameConfirm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasTextUTF8) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(hasTextUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).textUTF8) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(textUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strWidthUTF8) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(strWidthUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wantSymbolUTF8) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(wantSymbolUTF8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useRotatedTextInContour) as usize - ptr as usize }, - 420usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useRotatedTextInContour) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventEnv) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventEnv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eventHelper) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(eventHelper) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).holdflush) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(holdflush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparency) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparency) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveTransparentBg) as usize - ptr as usize }, - 452usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveTransparentBg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveRaster) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveRaster) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveCapture) as usize - ptr as usize }, - 460usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveCapture) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).haveLocator) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(haveLocator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setPattern) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setPattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releasePattern) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releasePattern) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setClipPath) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseClipPath) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseClipPath) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setMask) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(setMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseMask) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseMask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceVersion) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).deviceClip) as usize - ptr as usize }, - 524usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(deviceClip) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).defineGroup) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(defineGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).useGroup) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(useGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).releaseGroup) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(releaseGroup) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stroke) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(stroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fill) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fill) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fillStroke) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(fillStroke) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(capabilities) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).glyph) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(glyph) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(_DevDesc), - "::", - stringify!(reserved) - ) - ); -} pub const R_KeyName_knUNKNOWN: R_KeyName = -1; pub const R_KeyName_knLEFT: R_KeyName = 0; pub const R_KeyName_knUP: R_KeyName = 1; @@ -2173,41 +808,6 @@ pub struct GESystemDesc { #[doc = "An array of function pointers, one per graphics system that\n has registered with the graphics engine.\n\n system_Callback is called when the graphics engine wants\n to give a graphics system the chance to play with its\n device-specific information (stored in systemSpecific)\n There are two parameters: an \"event\" to tell the graphics\n system why the graphics engine has called this function,\n and the systemSpecific pointer. The graphics engine\n has to pass the systemSpecific pointer because only\n the graphics engine will know what array index to use."] pub callback: GEcallback, } -#[test] -fn bindgen_test_layout_GESystemDesc() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(GESystemDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GESystemDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).systemSpecific) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(systemSpecific) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GESystemDesc), - "::", - stringify!(callback) - ) - ); -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _GEDevDesc { @@ -2232,121 +832,6 @@ pub struct _GEDevDesc { #[doc = "Is a device appending a path ?"] pub appending: Rboolean, } -#[test] -fn bindgen_test_layout__GEDevDesc() { - const UNINIT: ::std::mem::MaybeUninit<_GEDevDesc> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_GEDevDesc>(), - 248usize, - concat!("Size of: ", stringify!(_GEDevDesc)) - ); - assert_eq!( - ::std::mem::align_of::<_GEDevDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_GEDevDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dev) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dev) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayListOn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayListOn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).displayList) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(displayList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DLlastElt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(DLlastElt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).savedSnapshot) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(savedSnapshot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dirty) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(dirty) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).recordGraphics) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(recordGraphics) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gesd) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(gesd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ask) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(ask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).appending) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(_GEDevDesc), - "::", - stringify!(appending) - ) - ); -} pub type pGEDevDesc = *mut GEDevDesc; #[doc = "-------------------------------------------------------------------\n\n COLOUR CODE is concerned with the internals of R colour representation\n\n From colors.c, used in par.c, grid/src/gpar.c"] pub type rcolor = ::std::os::raw::c_uint; @@ -2418,41 +903,6 @@ pub struct Rcomplex { pub r: f64, pub i: f64, } -#[test] -fn bindgen_test_layout_Rcomplex() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(Rcomplex)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Rcomplex)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(r) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Rcomplex), - "::", - stringify!(i) - ) - ); -} pub type __builtin_va_list = *mut ::std::os::raw::c_char; extern "C" { #[doc = "IEEE NaN"] diff --git a/build.rs b/build.rs index 3c15face..89786350 100644 --- a/build.rs +++ b/build.rs @@ -465,6 +465,12 @@ fn generate_bindings(r_paths: &InstallationPaths, version_info: &RVersionInfo) { // included header files changed. .parse_callbacks(Box::new(bindgen::CargoCallbacks::new())); + if cfg!(feature = "layout_tests") { + bindgen_builder = bindgen_builder.layout_tests(true); + } else { + bindgen_builder = bindgen_builder.layout_tests(false); + } + let target = env::var("TARGET").expect("Could not get the target triple"); let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap(); let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();