From 04f77a71af68a8cf829fb71ad56e620cb8ad55e6 Mon Sep 17 00:00:00 2001 From: cgmossa Date: Thu, 16 Nov 2023 14:49:16 +0100 Subject: [PATCH 1/6] Added manual `SEXPREC` implementation that ensures that the opaque type doesn't implement `Send`, `Sync`, or `Pin`. --- build.rs | 4 ++++ src/lib.rs | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/build.rs b/build.rs index 89786350..048832b6 100644 --- a/build.rs +++ b/build.rs @@ -465,6 +465,10 @@ fn generate_bindings(r_paths: &InstallationPaths, version_info: &RVersionInfo) { // included header files changed. .parse_callbacks(Box::new(bindgen::CargoCallbacks::new())); + // Provide manual bindings for `SEXPREC`, that ensures !Send, !Sync, !Pin + bindgen_builder = bindgen_builder.blocklist_type("SEXPREC"); + + // Don't include layout-tests in the published bindings, only for testing if cfg!(feature = "layout_tests") { bindgen_builder = bindgen_builder.layout_tests(true); } else { diff --git a/src/lib.rs b/src/lib.rs index cd882a0a..42932f53 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -66,6 +66,12 @@ include!(concat!(env!("OUT_DIR"), "/bindings.rs")); +#[repr(C)] +pub struct SEXPREC { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + #[cfg(test)] mod tests { use super::*; From 422cf9edf43bb8b26ae26de143dcec2b5db1f2e8 Mon Sep 17 00:00:00 2001 From: cgmossa Date: Fri, 17 Nov 2023 15:05:58 +0100 Subject: [PATCH 2/6] Added `[generate bindings]` command for CI --- .github/workflows/test.yml | 62 +++++++++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f0ceb847..34c3f4fc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -226,14 +226,60 @@ jobs: name: generated_binding-${{ matrix.config.os }}-R-${{ matrix.config.r }}-rust-${{ matrix.config.rust-version }}-${{ matrix.config.target || 'default'}} path: generated_bindings - # Run tests again using different bindings - - name: Run tests on precomputed bindings shipped with libR-sys - if: matrix.config.skip-tests != 'true' - run: | - . ./ci-cargo.ps1 - 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 }} + # # Run tests again using different bindings + # - name: Run tests on precomputed bindings shipped with libR-sys + # if: matrix.config.skip-tests != 'true' + # run: | + # . ./ci-cargo.ps1 + # 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 }} + check_generate_bindings_flag: + name: Check if [generate bindings] is in latest commit message + runs-on: ubuntu-latest + outputs: + head_commit_message: ${{ steps.get_head_commit_message.outputs.HEAD_COMMIT_MESSAGE }} + generate_bindings: ${{ contains(steps.get_head_commit_message.outputs.HEAD_COMMIT_MESSAGE, '[generate bindings]') }} + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Get Head Commit Message + id: get_head_commit_message + run: echo "HEAD_COMMIT_MESSAGE=$(git show -s --format=%s)" >> "$GITHUB_OUTPUT" + + pr_generated_bindings: + name: Make PR with generated bindings + needs: [test_with_bindgen, check_generate_bindings_flag] + if: needs.check_generate_bindings_flag.outputs.generate_bindings + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + + - uses: actions/download-artifact@v3 + + - name: Update bindings + run: | + # Update or add the bindings + cp generated_binding-*/*.rs bindings/ + + # Replace the default bindings + cd bindings + for x in linux-aarch64 linux-x86_64 macos-aarch64 macos-x86_64 windows-x86_64; do + # Choose the newest version except for devel + ln --force -s "$(ls -1 ./bindings-${x}-*.rs | grep -v devel | sort | tail -1)" ./bindings-${x}.rs + done + cd .. + - name: Add generated bindings + run: | + git add bindings/ + git config --local user.name "${GITHUB_ACTOR}" + git config --local user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git commit -m "Update bindings [skip ci]" + - name: Push to PR branch + run: git push # Gather the generated bindings and push them to generated_bindings branch. # If we need to update the bindings, create a pull request from that branch. From 9f726ae81a11cc2c41ded9ed6d771a4322369b26 Mon Sep 17 00:00:00 2001 From: cgmossa Date: Fri, 17 Nov 2023 15:09:49 +0100 Subject: [PATCH 3/6] Update maintainer guide --- MAINTAINERS_GUIDE.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/MAINTAINERS_GUIDE.md b/MAINTAINERS_GUIDE.md index 8407a1b3..0bbe87cf 100644 --- a/MAINTAINERS_GUIDE.md +++ b/MAINTAINERS_GUIDE.md @@ -1,3 +1,17 @@ +# GUIDE + +## Commit newly generated bindings + +You last commit must contain `[generate bindings]`. You can make an empty +commit with this message: + +```sh +git commit -m "[generate bindings]" --allow-empty +``` + +Then after successfully running workflows, GitHub Actions will push a commit +with the updated bindings onto your PR branch. + ## Precomputed bindings ### How to update the precomputed bindings? From 699356abf3071faac5b0daacff8d10b9a008f27e Mon Sep 17 00:00:00 2001 From: CGMossa Date: Fri, 17 Nov 2023 14:19:41 +0000 Subject: [PATCH 4/6] Update bindings [skip ci] --- bindings/bindings-linux-aarch64-R4.4-devel.rs | 4 ++-- bindings/bindings-linux-x86_64-R4.4-devel.rs | 4 ++-- bindings/bindings-macos-x86_64-R4.4-devel.rs | 4 ++-- bindings/bindings-windows-x86_64-R4.4-devel.rs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bindings/bindings-linux-aarch64-R4.4-devel.rs b/bindings/bindings-linux-aarch64-R4.4-devel.rs index 6b55142c..674b5b4c 100644 --- a/bindings/bindings-linux-aarch64-R4.4-devel.rs +++ b/bindings/bindings-linux-aarch64-R4.4-devel.rs @@ -164,8 +164,8 @@ pub const R_MINOR: &[u8; 4] = b"4.0\0"; pub const R_STATUS: &[u8; 29] = b"Under development (unstable)\0"; pub const R_YEAR: &[u8; 5] = b"2023\0"; pub const R_MONTH: &[u8; 3] = b"11\0"; -pub const R_DAY: &[u8; 3] = b"11\0"; -pub const R_SVN_REVISION: u32 = 85510; +pub const R_DAY: &[u8; 3] = b"14\0"; +pub const R_SVN_REVISION: u32 = 85524; pub const R_GE_definitions: u32 = 13; pub const R_GE_deviceClip: u32 = 14; pub const R_GE_group: u32 = 15; diff --git a/bindings/bindings-linux-x86_64-R4.4-devel.rs b/bindings/bindings-linux-x86_64-R4.4-devel.rs index 12c3b953..4d61769b 100644 --- a/bindings/bindings-linux-x86_64-R4.4-devel.rs +++ b/bindings/bindings-linux-x86_64-R4.4-devel.rs @@ -164,8 +164,8 @@ pub const R_MINOR: &[u8; 4] = b"4.0\0"; pub const R_STATUS: &[u8; 29] = b"Under development (unstable)\0"; pub const R_YEAR: &[u8; 5] = b"2023\0"; pub const R_MONTH: &[u8; 3] = b"11\0"; -pub const R_DAY: &[u8; 3] = b"11\0"; -pub const R_SVN_REVISION: u32 = 85510; +pub const R_DAY: &[u8; 3] = b"14\0"; +pub const R_SVN_REVISION: u32 = 85524; pub const R_GE_definitions: u32 = 13; pub const R_GE_deviceClip: u32 = 14; pub const R_GE_group: u32 = 15; diff --git a/bindings/bindings-macos-x86_64-R4.4-devel.rs b/bindings/bindings-macos-x86_64-R4.4-devel.rs index e9088ccc..983cc240 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.2 */ -/* clang-rs version: Homebrew clang version 17.0.2 */ +/* bindgen clang version: Homebrew clang version 17.0.3 */ +/* clang-rs version: Homebrew clang version 17.0.3 */ /* r version: 4.4.0-devel */ #[repr(C)] diff --git a/bindings/bindings-windows-x86_64-R4.4-devel.rs b/bindings/bindings-windows-x86_64-R4.4-devel.rs index d132bc36..67bbf62f 100644 --- a/bindings/bindings-windows-x86_64-R4.4-devel.rs +++ b/bindings/bindings-windows-x86_64-R4.4-devel.rs @@ -83,8 +83,8 @@ pub const R_MINOR: &[u8; 4] = b"4.0\0"; pub const R_STATUS: &[u8; 29] = b"Under development (unstable)\0"; pub const R_YEAR: &[u8; 5] = b"2023\0"; pub const R_MONTH: &[u8; 3] = b"11\0"; -pub const R_DAY: &[u8; 3] = b"11\0"; -pub const R_SVN_REVISION: u32 = 85510; +pub const R_DAY: &[u8; 3] = b"16\0"; +pub const R_SVN_REVISION: u32 = 85542; pub const R_GE_definitions: u32 = 13; pub const R_GE_deviceClip: u32 = 14; pub const R_GE_group: u32 = 15; From cd7fa557081a0f42a6c3689a2f0e64563cbf8ae8 Mon Sep 17 00:00:00 2001 From: cgmossa Date: Fri, 17 Nov 2023 16:10:51 +0100 Subject: [PATCH 5/6] [generate bindings] From 45e0e6e51b35f1578aa81fe407f9b0dfc9dd32c5 Mon Sep 17 00:00:00 2001 From: CGMossa Date: Fri, 17 Nov 2023 15:17:33 +0000 Subject: [PATCH 6/6] Update bindings [skip ci] --- bindings/bindings-linux-aarch64-R4.2.rs | 5 -- bindings/bindings-linux-aarch64-R4.3.rs | 5 -- bindings/bindings-linux-aarch64-R4.4-devel.rs | 5 -- bindings/bindings-linux-x86_64-R4.2.rs | 5 -- bindings/bindings-linux-x86_64-R4.3.rs | 5 -- bindings/bindings-linux-x86_64-R4.4-devel.rs | 5 -- bindings/bindings-macos-aarch64-R4.3.rs | 5 -- bindings/bindings-macos-x86_64-R4.2.rs | 49 +------------------ bindings/bindings-macos-x86_64-R4.3.rs | 49 ++++++++++++++++--- bindings/bindings-macos-x86_64-R4.4-devel.rs | 5 -- bindings/bindings-windows-x86_64-R4.2.rs | 5 -- bindings/bindings-windows-x86_64-R4.3.rs | 5 -- .../bindings-windows-x86_64-R4.4-devel.rs | 5 -- 13 files changed, 44 insertions(+), 109 deletions(-) diff --git a/bindings/bindings-linux-aarch64-R4.2.rs b/bindings/bindings-linux-aarch64-R4.2.rs index 75f8b856..c8c3dd77 100644 --- a/bindings/bindings-linux-aarch64-R4.2.rs +++ b/bindings/bindings-linux-aarch64-R4.2.rs @@ -334,11 +334,6 @@ pub type Rbyte = ::std::os::raw::c_uchar; pub type R_len_t = ::std::os::raw::c_int; #[doc = "NOT YET using enum:\n 1)\tThe internal SEXPREC struct has 'SEXPTYPE type : 5'\n\t(making FUNSXP and CLOSXP equivalent in there),\n\tgiving (-Wall only ?) warnings all over the place\n 2)\tMany switch(type) { case ... } statements need a final `default:'\n\tadded in order to avoid warnings like \\[e.g. l.170 of ../main/util.c\\]\n\t \"enumeration value `FUNSXP' not handled in switch\""] pub type SEXPTYPE = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct SEXPREC { - _unused: [u8; 0], -} pub type SEXP = *mut SEXPREC; #[doc = "We sometimes need to coerce a protected value and place the new\ncoerced value under protection. For these cases PROTECT_WITH_INDEX\nsaves an index of the protection location that can be used to\nreplace the protected value using REPROTECT."] pub type PROTECT_INDEX = ::std::os::raw::c_int; diff --git a/bindings/bindings-linux-aarch64-R4.3.rs b/bindings/bindings-linux-aarch64-R4.3.rs index 13109071..073154db 100644 --- a/bindings/bindings-linux-aarch64-R4.3.rs +++ b/bindings/bindings-linux-aarch64-R4.3.rs @@ -340,11 +340,6 @@ pub type Rbyte = ::std::os::raw::c_uchar; pub type R_len_t = ::std::os::raw::c_int; #[doc = "NOT YET using enum:\n 1)\tThe internal SEXPREC struct has 'SEXPTYPE type : 5'\n\t(making FUNSXP and CLOSXP equivalent in there),\n\tgiving (-Wall only ?) warnings all over the place\n 2)\tMany switch(type) { case ... } statements need a final `default:'\n\tadded in order to avoid warnings like \\[e.g. l.170 of ../main/util.c\\]\n\t \"enumeration value `FUNSXP' not handled in switch\""] pub type SEXPTYPE = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct SEXPREC { - _unused: [u8; 0], -} pub type SEXP = *mut SEXPREC; #[doc = "We sometimes need to coerce a protected value and place the new\ncoerced value under protection. For these cases PROTECT_WITH_INDEX\nsaves an index of the protection location that can be used to\nreplace the protected value using REPROTECT."] pub type PROTECT_INDEX = ::std::os::raw::c_int; diff --git a/bindings/bindings-linux-aarch64-R4.4-devel.rs b/bindings/bindings-linux-aarch64-R4.4-devel.rs index 674b5b4c..9eb019ca 100644 --- a/bindings/bindings-linux-aarch64-R4.4-devel.rs +++ b/bindings/bindings-linux-aarch64-R4.4-devel.rs @@ -341,11 +341,6 @@ pub type Rbyte = ::std::os::raw::c_uchar; pub type R_len_t = ::std::os::raw::c_int; #[doc = "NOT YET using enum:\n 1)\tThe internal SEXPREC struct has 'SEXPTYPE type : 5'\n\t(making FUNSXP and CLOSXP equivalent in there),\n\tgiving (-Wall only ?) warnings all over the place\n 2)\tMany switch(type) { case ... } statements need a final `default:'\n\tadded in order to avoid warnings like \\[e.g. l.170 of ../main/util.c\\]\n\t \"enumeration value `FUNSXP' not handled in switch\""] pub type SEXPTYPE = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct SEXPREC { - _unused: [u8; 0], -} pub type SEXP = *mut SEXPREC; #[doc = "We sometimes need to coerce a protected value and place the new\ncoerced value under protection. For these cases PROTECT_WITH_INDEX\nsaves an index of the protection location that can be used to\nreplace the protected value using REPROTECT."] pub type PROTECT_INDEX = ::std::os::raw::c_int; diff --git a/bindings/bindings-linux-x86_64-R4.2.rs b/bindings/bindings-linux-x86_64-R4.2.rs index 7cd2a0d7..ef497e7c 100644 --- a/bindings/bindings-linux-x86_64-R4.2.rs +++ b/bindings/bindings-linux-x86_64-R4.2.rs @@ -334,11 +334,6 @@ pub type Rbyte = ::std::os::raw::c_uchar; pub type R_len_t = ::std::os::raw::c_int; #[doc = "NOT YET using enum:\n 1)\tThe internal SEXPREC struct has 'SEXPTYPE type : 5'\n\t(making FUNSXP and CLOSXP equivalent in there),\n\tgiving (-Wall only ?) warnings all over the place\n 2)\tMany switch(type) { case ... } statements need a final `default:'\n\tadded in order to avoid warnings like \\[e.g. l.170 of ../main/util.c\\]\n\t \"enumeration value `FUNSXP' not handled in switch\""] pub type SEXPTYPE = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct SEXPREC { - _unused: [u8; 0], -} pub type SEXP = *mut SEXPREC; #[doc = "We sometimes need to coerce a protected value and place the new\ncoerced value under protection. For these cases PROTECT_WITH_INDEX\nsaves an index of the protection location that can be used to\nreplace the protected value using REPROTECT."] pub type PROTECT_INDEX = ::std::os::raw::c_int; diff --git a/bindings/bindings-linux-x86_64-R4.3.rs b/bindings/bindings-linux-x86_64-R4.3.rs index 5e38c2a8..270809c9 100644 --- a/bindings/bindings-linux-x86_64-R4.3.rs +++ b/bindings/bindings-linux-x86_64-R4.3.rs @@ -340,11 +340,6 @@ pub type Rbyte = ::std::os::raw::c_uchar; pub type R_len_t = ::std::os::raw::c_int; #[doc = "NOT YET using enum:\n 1)\tThe internal SEXPREC struct has 'SEXPTYPE type : 5'\n\t(making FUNSXP and CLOSXP equivalent in there),\n\tgiving (-Wall only ?) warnings all over the place\n 2)\tMany switch(type) { case ... } statements need a final `default:'\n\tadded in order to avoid warnings like \\[e.g. l.170 of ../main/util.c\\]\n\t \"enumeration value `FUNSXP' not handled in switch\""] pub type SEXPTYPE = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct SEXPREC { - _unused: [u8; 0], -} pub type SEXP = *mut SEXPREC; #[doc = "We sometimes need to coerce a protected value and place the new\ncoerced value under protection. For these cases PROTECT_WITH_INDEX\nsaves an index of the protection location that can be used to\nreplace the protected value using REPROTECT."] pub type PROTECT_INDEX = ::std::os::raw::c_int; diff --git a/bindings/bindings-linux-x86_64-R4.4-devel.rs b/bindings/bindings-linux-x86_64-R4.4-devel.rs index 4d61769b..ce458c14 100644 --- a/bindings/bindings-linux-x86_64-R4.4-devel.rs +++ b/bindings/bindings-linux-x86_64-R4.4-devel.rs @@ -341,11 +341,6 @@ pub type Rbyte = ::std::os::raw::c_uchar; pub type R_len_t = ::std::os::raw::c_int; #[doc = "NOT YET using enum:\n 1)\tThe internal SEXPREC struct has 'SEXPTYPE type : 5'\n\t(making FUNSXP and CLOSXP equivalent in there),\n\tgiving (-Wall only ?) warnings all over the place\n 2)\tMany switch(type) { case ... } statements need a final `default:'\n\tadded in order to avoid warnings like \\[e.g. l.170 of ../main/util.c\\]\n\t \"enumeration value `FUNSXP' not handled in switch\""] pub type SEXPTYPE = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct SEXPREC { - _unused: [u8; 0], -} pub type SEXP = *mut SEXPREC; #[doc = "We sometimes need to coerce a protected value and place the new\ncoerced value under protection. For these cases PROTECT_WITH_INDEX\nsaves an index of the protection location that can be used to\nreplace the protected value using REPROTECT."] pub type PROTECT_INDEX = ::std::os::raw::c_int; diff --git a/bindings/bindings-macos-aarch64-R4.3.rs b/bindings/bindings-macos-aarch64-R4.3.rs index 051bafd1..6f4c0180 100644 --- a/bindings/bindings-macos-aarch64-R4.3.rs +++ b/bindings/bindings-macos-aarch64-R4.3.rs @@ -350,11 +350,6 @@ pub type Rbyte = ::std::os::raw::c_uchar; pub type R_len_t = ::std::os::raw::c_int; #[doc = "NOT YET using enum:\n 1)\tThe internal SEXPREC struct has 'SEXPTYPE type : 5'\n\t(making FUNSXP and CLOSXP equivalent in there),\n\tgiving (-Wall only ?) warnings all over the place\n 2)\tMany switch(type) { case ... } statements need a final `default:'\n\tadded in order to avoid warnings like \\[e.g. l.170 of ../main/util.c\\]\n\t \"enumeration value `FUNSXP' not handled in switch\""] pub type SEXPTYPE = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct SEXPREC { - _unused: [u8; 0], -} pub type SEXP = *mut SEXPREC; #[doc = "We sometimes need to coerce a protected value and place the new\ncoerced value under protection. For these cases PROTECT_WITH_INDEX\nsaves an index of the protection location that can be used to\nreplace the protected value using REPROTECT."] pub type PROTECT_INDEX = ::std::os::raw::c_int; diff --git a/bindings/bindings-macos-x86_64-R4.2.rs b/bindings/bindings-macos-x86_64-R4.2.rs index f3f831a3..5db6ae7c 100644 --- a/bindings/bindings-macos-x86_64-R4.2.rs +++ b/bindings/bindings-macos-x86_64-R4.2.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.2.3 */ #[repr(C)] @@ -344,11 +344,6 @@ pub type Rbyte = ::std::os::raw::c_uchar; pub type R_len_t = ::std::os::raw::c_int; #[doc = "NOT YET using enum:\n 1)\tThe internal SEXPREC struct has 'SEXPTYPE type : 5'\n\t(making FUNSXP and CLOSXP equivalent in there),\n\tgiving (-Wall only ?) warnings all over the place\n 2)\tMany switch(type) { case ... } statements need a final `default:'\n\tadded in order to avoid warnings like \\[e.g. l.170 of ../main/util.c\\]\n\t \"enumeration value `FUNSXP' not handled in switch\""] pub type SEXPTYPE = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct SEXPREC { - _unused: [u8; 0], -} pub type SEXP = *mut SEXPREC; #[doc = "We sometimes need to coerce a protected value and place the new\ncoerced value under protection. For these cases PROTECT_WITH_INDEX\nsaves an index of the protection location that can be used to\nreplace the protected value using REPROTECT."] pub type PROTECT_INDEX = ::std::os::raw::c_int; @@ -2021,7 +2016,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, @@ -2045,7 +2039,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, @@ -2062,7 +2055,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, @@ -2083,11 +2075,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, @@ -2104,7 +2094,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, @@ -2121,7 +2110,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, @@ -2136,7 +2124,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, @@ -2153,7 +2140,6 @@ extern "C" { arg5: ::std::os::raw::c_int, ) -> f64; pub fn Rf_rnchisq(arg1: f64, arg2: f64) -> f64; - #[doc = "F Distibution"] pub fn Rf_df(arg1: f64, arg2: f64, arg3: f64, arg4: ::std::os::raw::c_int) -> f64; pub fn Rf_pf( arg1: f64, @@ -2170,7 +2156,6 @@ extern "C" { arg5: ::std::os::raw::c_int, ) -> f64; pub fn Rf_rf(arg1: f64, arg2: f64) -> f64; - #[doc = "Student t Distibution"] pub fn Rf_dt(arg1: f64, arg2: f64, arg3: ::std::os::raw::c_int) -> f64; pub fn Rf_pt( arg1: f64, @@ -2185,7 +2170,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( @@ -2203,14 +2187,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, @@ -2227,7 +2209,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, @@ -2242,7 +2223,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, @@ -2257,7 +2237,6 @@ extern "C" { arg4: ::std::os::raw::c_int, ) -> f64; pub fn Rf_rgeom(arg1: f64) -> f64; - #[doc = "Hypergeometric Distibution"] pub fn Rf_dhyper( arg1: f64, arg2: f64, @@ -2282,7 +2261,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, @@ -2315,7 +2293,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( @@ -2331,7 +2308,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, @@ -2348,7 +2324,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, @@ -2365,7 +2340,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, @@ -2390,7 +2364,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, @@ -2408,7 +2381,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, @@ -2424,7 +2396,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, @@ -2441,7 +2412,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, @@ -2459,7 +2429,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, @@ -2475,7 +2444,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; @@ -2497,7 +2465,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; @@ -2506,7 +2473,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, @@ -2643,22 +2609,15 @@ extern "C" { pub fn R_set_altstring_No_NA_method(cls: R_altrep_class_t, fun: R_altstring_No_NA_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); @@ -2675,7 +2634,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, @@ -2693,7 +2651,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; @@ -2723,10 +2680,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.3.rs b/bindings/bindings-macos-x86_64-R4.3.rs index 1d1547c9..267621c1 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 16.0.6 */ -/* clang-rs version: Homebrew clang version 16.0.6 */ +/* bindgen clang version: Homebrew clang version 17.0.3 */ +/* clang-rs version: Homebrew clang version 17.0.3 */ /* r version: 4.3.2 */ #[repr(C)] @@ -350,11 +350,6 @@ pub type Rbyte = ::std::os::raw::c_uchar; pub type R_len_t = ::std::os::raw::c_int; #[doc = "NOT YET using enum:\n 1)\tThe internal SEXPREC struct has 'SEXPTYPE type : 5'\n\t(making FUNSXP and CLOSXP equivalent in there),\n\tgiving (-Wall only ?) warnings all over the place\n 2)\tMany switch(type) { case ... } statements need a final `default:'\n\tadded in order to avoid warnings like \\[e.g. l.170 of ../main/util.c\\]\n\t \"enumeration value `FUNSXP' not handled in switch\""] pub type SEXPTYPE = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct SEXPREC { - _unused: [u8; 0], -} pub type SEXP = *mut SEXPREC; #[doc = "We sometimes need to coerce a protected value and place the new\ncoerced value under protection. For these cases PROTECT_WITH_INDEX\nsaves an index of the protection location that can be used to\nreplace the protected value using REPROTECT."] pub type PROTECT_INDEX = ::std::os::raw::c_int; @@ -2053,6 +2048,7 @@ 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, @@ -2076,6 +2072,7 @@ 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, @@ -2092,6 +2089,7 @@ 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, @@ -2112,9 +2110,11 @@ 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, @@ -2131,6 +2131,7 @@ 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, @@ -2147,6 +2148,7 @@ 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, @@ -2161,6 +2163,7 @@ 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, @@ -2177,6 +2180,7 @@ 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, @@ -2193,6 +2197,7 @@ 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, @@ -2207,6 +2212,7 @@ 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( @@ -2224,12 +2230,14 @@ 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, @@ -2246,6 +2254,7 @@ 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, @@ -2260,6 +2269,7 @@ 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, @@ -2274,6 +2284,7 @@ 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, @@ -2298,6 +2309,7 @@ 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, @@ -2330,6 +2342,7 @@ 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( @@ -2345,6 +2358,7 @@ 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, @@ -2361,6 +2375,7 @@ 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, @@ -2377,6 +2392,7 @@ 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, @@ -2401,6 +2417,7 @@ 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, @@ -2418,6 +2435,7 @@ 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, @@ -2433,6 +2451,7 @@ 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, @@ -2449,6 +2468,7 @@ 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, @@ -2466,6 +2486,7 @@ 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, @@ -2481,6 +2502,7 @@ 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; @@ -2502,6 +2524,7 @@ 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; @@ -2510,6 +2533,7 @@ 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, @@ -2653,15 +2677,22 @@ 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); @@ -2678,6 +2709,7 @@ 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, @@ -2695,6 +2727,7 @@ 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; @@ -2724,8 +2757,10 @@ 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 983cc240..28436266 100644 --- a/bindings/bindings-macos-x86_64-R4.4-devel.rs +++ b/bindings/bindings-macos-x86_64-R4.4-devel.rs @@ -351,11 +351,6 @@ pub type Rbyte = ::std::os::raw::c_uchar; pub type R_len_t = ::std::os::raw::c_int; #[doc = "NOT YET using enum:\n 1)\tThe internal SEXPREC struct has 'SEXPTYPE type : 5'\n\t(making FUNSXP and CLOSXP equivalent in there),\n\tgiving (-Wall only ?) warnings all over the place\n 2)\tMany switch(type) { case ... } statements need a final `default:'\n\tadded in order to avoid warnings like \\[e.g. l.170 of ../main/util.c\\]\n\t \"enumeration value `FUNSXP' not handled in switch\""] pub type SEXPTYPE = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct SEXPREC { - _unused: [u8; 0], -} pub type SEXP = *mut SEXPREC; #[doc = "We sometimes need to coerce a protected value and place the new\ncoerced value under protection. For these cases PROTECT_WITH_INDEX\nsaves an index of the protection location that can be used to\nreplace the protected value using REPROTECT."] pub type PROTECT_INDEX = ::std::os::raw::c_int; diff --git a/bindings/bindings-windows-x86_64-R4.2.rs b/bindings/bindings-windows-x86_64-R4.2.rs index 47d14573..8f989f66 100644 --- a/bindings/bindings-windows-x86_64-R4.2.rs +++ b/bindings/bindings-windows-x86_64-R4.2.rs @@ -208,11 +208,6 @@ pub type Rbyte = ::std::os::raw::c_uchar; pub type R_len_t = ::std::os::raw::c_int; #[doc = "NOT YET using enum:\n 1)\tThe internal SEXPREC struct has 'SEXPTYPE type : 5'\n\t(making FUNSXP and CLOSXP equivalent in there),\n\tgiving (-Wall only ?) warnings all over the place\n 2)\tMany switch(type) { case ... } statements need a final `default:'\n\tadded in order to avoid warnings like \\[e.g. l.170 of ../main/util.c\\]\n\t \"enumeration value `FUNSXP' not handled in switch\""] pub type SEXPTYPE = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct SEXPREC { - _unused: [u8; 0], -} pub type SEXP = *mut SEXPREC; #[doc = "We sometimes need to coerce a protected value and place the new\ncoerced value under protection. For these cases PROTECT_WITH_INDEX\nsaves an index of the protection location that can be used to\nreplace the protected value using REPROTECT."] pub type PROTECT_INDEX = ::std::os::raw::c_int; diff --git a/bindings/bindings-windows-x86_64-R4.3.rs b/bindings/bindings-windows-x86_64-R4.3.rs index d403f524..4b45a6b4 100644 --- a/bindings/bindings-windows-x86_64-R4.3.rs +++ b/bindings/bindings-windows-x86_64-R4.3.rs @@ -214,11 +214,6 @@ pub type Rbyte = ::std::os::raw::c_uchar; pub type R_len_t = ::std::os::raw::c_int; #[doc = "NOT YET using enum:\n 1)\tThe internal SEXPREC struct has 'SEXPTYPE type : 5'\n\t(making FUNSXP and CLOSXP equivalent in there),\n\tgiving (-Wall only ?) warnings all over the place\n 2)\tMany switch(type) { case ... } statements need a final `default:'\n\tadded in order to avoid warnings like \\[e.g. l.170 of ../main/util.c\\]\n\t \"enumeration value `FUNSXP' not handled in switch\""] pub type SEXPTYPE = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct SEXPREC { - _unused: [u8; 0], -} pub type SEXP = *mut SEXPREC; #[doc = "We sometimes need to coerce a protected value and place the new\ncoerced value under protection. For these cases PROTECT_WITH_INDEX\nsaves an index of the protection location that can be used to\nreplace the protected value using REPROTECT."] pub type PROTECT_INDEX = ::std::os::raw::c_int; diff --git a/bindings/bindings-windows-x86_64-R4.4-devel.rs b/bindings/bindings-windows-x86_64-R4.4-devel.rs index 67bbf62f..4faddf62 100644 --- a/bindings/bindings-windows-x86_64-R4.4-devel.rs +++ b/bindings/bindings-windows-x86_64-R4.4-devel.rs @@ -215,11 +215,6 @@ pub type Rbyte = ::std::os::raw::c_uchar; pub type R_len_t = ::std::os::raw::c_int; #[doc = "NOT YET using enum:\n 1)\tThe internal SEXPREC struct has 'SEXPTYPE type : 5'\n\t(making FUNSXP and CLOSXP equivalent in there),\n\tgiving (-Wall only ?) warnings all over the place\n 2)\tMany switch(type) { case ... } statements need a final `default:'\n\tadded in order to avoid warnings like \\[e.g. l.170 of ../main/util.c\\]\n\t \"enumeration value `FUNSXP' not handled in switch\""] pub type SEXPTYPE = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct SEXPREC { - _unused: [u8; 0], -} pub type SEXP = *mut SEXPREC; #[doc = "We sometimes need to coerce a protected value and place the new\ncoerced value under protection. For these cases PROTECT_WITH_INDEX\nsaves an index of the protection location that can be used to\nreplace the protected value using REPROTECT."] pub type PROTECT_INDEX = ::std::os::raw::c_int;