Skip to content

Commit

Permalink
Add bindings for 4.2 again (#246)
Browse files Browse the repository at this point in the history
* Add R4.2 to the CI binding generation

* Adds R 4.2 variants for aarch64 and x86

* Update bindings [skip ci]

---------

Co-authored-by: andres <[email protected]>
Co-authored-by: CGMossa <[email protected]>
  • Loading branch information
3 people authored Jun 13, 2024
1 parent 09d76ad commit b26b858
Show file tree
Hide file tree
Showing 15 changed files with 318 additions and 308 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@ jobs:
- {os: windows-latest, r: 'devel', rust-version: 'stable-msvc', target: 'x86_64-pc-windows-gnu', emit-bindings: 'true'}
- {os: windows-latest, r: 'release', rust-version: 'stable-gnu', target: 'x86_64-pc-windows-gnu'}
- {os: windows-latest, r: 'oldrel', rust-version: 'stable-msvc', target: 'x86_64-pc-windows-gnu', emit-bindings: 'true'}
- {os: windows-latest, r: '4.2', rust-version: 'stable-msvc', target: 'x86_64-pc-windows-gnu', emit-bindings: 'true' }

- {os: macOS-latest, r: 'release', rust-version: 'nightly'}
- {os: macOS-latest, r: 'devel', rust-version: 'stable', emit-bindings: 'true'}
- {os: macOS-latest, r: 'oldrel', rust-version: 'stable', emit-bindings: 'true'}
- {os: macOS-latest, r: 'release', rust-version: 'stable', emit-bindings: 'true'}
- {os: macOS-latest, r: 'release', rust-version: 'stable', target: 'x86_64-apple-darwin', skip-tests: 'true', emit-bindings: 'true'}

- {os: macOS-latest, r: '4.2', rust-version: 'stable', emit-bindings: 'true' }
- {os: macOS-latest, r: '4.2', rust-version: 'stable', target: 'x86_64-apple-darwin', skip-tests: 'true', emit-bindings: 'true'}

- {os: ubuntu-latest, r: 'release', rust-version: 'nightly'}
- {os: ubuntu-latest, r: 'release', rust-version: 'stable', emit-bindings: 'true'}
Expand All @@ -78,6 +80,8 @@ jobs:
- {os: ubuntu-latest, r: 'oldrel', rust-version: 'stable', emit-bindings: 'true'}
- {os: ubuntu-latest, r: 'oldrel', rust-version: 'stable', target: 'aarch64-unknown-linux-gnu', skip-tests: 'true', emit-bindings: 'true'}

- {os: ubuntu-latest, r: '4.2', rust-version: 'stable', emit-bindings: 'true' }
- {os: ubuntu-latest, r: '4.2', rust-version: 'stable', target: 'aarch64-unknown-linux-gnu', skip-tests: 'true', emit-bindings: 'true'}
env:
RSPM: ${{ matrix.config.rspm }}

Expand Down Expand Up @@ -252,7 +256,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
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"
Expand Down
68 changes: 18 additions & 50 deletions bindings/bindings-linux-aarch64-R4.2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

/* libR-sys version: 0.7.0 */
/* bindgen clang version: Ubuntu clang version 15.0.7 */
/* clang-rs version: Ubuntu clang version 15.0.7 */
/* r version: 4.2.3 */

#[repr(C)]
Expand Down Expand Up @@ -258,7 +257,6 @@ pub struct _IO_FILE {
pub _unused2: [::std::os::raw::c_char; 20usize],
}
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum Rboolean {
#[doc = ", MAYBE"]
Expand Down Expand Up @@ -301,7 +299,6 @@ pub struct Rf_RegisteredNativeSymbol {
}
pub type R_RegisteredNativeSymbol = Rf_RegisteredNativeSymbol;
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum NativeSymbolType {
R_ANY_SYM = 0,
Expand All @@ -314,7 +311,6 @@ pub type Rbyte = ::std::os::raw::c_uchar;
#[doc = "type for length of (standard, not long) vectors etc"]
pub type R_len_t = ::std::os::raw::c_int;
#[repr(u32)]
#[non_exhaustive]
#[doc = "------ enum_SEXPTYPE -----"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum SEXPTYPE {
Expand Down Expand Up @@ -383,7 +379,6 @@ pub struct R_allocator {
}
pub type R_allocator_t = R_allocator;
#[repr(u32)]
#[non_exhaustive]
#[doc = "../main/character.c :"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum nchar_type {
Expand All @@ -392,7 +387,6 @@ pub enum nchar_type {
Width = 2,
}
#[repr(u32)]
#[non_exhaustive]
#[doc = "cetype_t is an identifier reseved by POSIX, but it is\nwell established as public. Could remap by a #define though"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cetype_t {
Expand All @@ -407,7 +401,6 @@ pub enum cetype_t {
pub type R_CFinalizer_t = ::std::option::Option<unsafe extern "C" fn(arg1: SEXP)>;
pub type R_pstream_data_t = *mut ::std::os::raw::c_void;
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum R_pstream_format_t {
R_pstream_any_format = 0,
Expand Down Expand Up @@ -459,14 +452,31 @@ pub struct R_inpstream_st {
pub nat2nat_obj: *mut ::std::os::raw::c_void,
pub nat2utf8_obj: *mut ::std::os::raw::c_void,
}
pub const SORTED_DECR_NA_1ST: _bindgen_ty_2 = _bindgen_ty_2::SORTED_DECR_NA_1ST;
pub const SORTED_DECR: _bindgen_ty_2 = _bindgen_ty_2::SORTED_DECR;
pub const UNKNOWN_SORTEDNESS: _bindgen_ty_2 = _bindgen_ty_2::UNKNOWN_SORTEDNESS;
pub const SORTED_INCR: _bindgen_ty_2 = _bindgen_ty_2::SORTED_INCR;
pub const SORTED_INCR_NA_1ST: _bindgen_ty_2 = _bindgen_ty_2::SORTED_INCR_NA_1ST;
pub const KNOWN_UNSORTED: _bindgen_ty_2 = _bindgen_ty_2::KNOWN_UNSORTED;
#[repr(i32)]
#[doc = "ALTREP sorting support"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_2 {
SORTED_DECR_NA_1ST = -2,
SORTED_DECR = -1,
#[doc = "INT_MIN is NA_INTEGER!"]
UNKNOWN_SORTEDNESS = -2147483648,
SORTED_INCR = 1,
SORTED_INCR_NA_1ST = 2,
KNOWN_UNSORTED = 0,
}
#[doc = "try to allow some type checking"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct R_hashtab_type {
pub cell: SEXP,
}
#[repr(u32)]
#[non_exhaustive]
#[doc = "Startup Actions"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum SA_TYPE {
Expand Down Expand Up @@ -543,7 +553,6 @@ impl structRstart {
}
pub type Rstart = *mut structRstart;
#[repr(u32)]
#[non_exhaustive]
#[doc = "PARSE_NULL will not be returned by R_ParseVector"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ParseStatus {
Expand Down Expand Up @@ -575,8 +584,6 @@ pub type R_altrep_DuplicateEX_method_t =
::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: Rboolean) -> SEXP>;
pub type R_altrep_Duplicate_method_t =
::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: Rboolean) -> SEXP>;
pub type R_altrep_Coerce_method_t =
::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: ::std::os::raw::c_int) -> SEXP>;
pub type R_altrep_Inspect_method_t = ::std::option::Option<
unsafe extern "C" fn(
arg1: SEXP,
Expand Down Expand Up @@ -679,7 +686,6 @@ pub type R_altstring_Is_sorted_method_t =
pub type R_altstring_No_NA_method_t =
::std::option::Option<unsafe extern "C" fn(arg1: SEXP) -> ::std::os::raw::c_int>;
#[repr(u32)]
#[non_exhaustive]
#[doc = "The graphics engine will only accept locations and dimensions\n in native device coordinates, but it provides the following functions\n for converting between a couple of simple alternative coordinate\n systems and device coordinates:\n DEVICE = native units of the device\n NDC = Normalised device coordinates\n INCHES = inches (!)\n CM = centimetres (!!)"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum GEUnit {
Expand All @@ -691,7 +697,6 @@ pub enum GEUnit {
GE_CM = 3,
}
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum GEevent {
#[doc = "In response to this event, the registered graphics system\n should allocate and initialise the systemSpecific structure\n\n Should return R_NilValue on failure so that engine\n can tidy up memory allocation"]
Expand All @@ -714,7 +719,6 @@ pub enum GEevent {
GE_ScalePS = 8,
}
#[repr(u32)]
#[non_exhaustive]
#[doc = "Some line end/join constants"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum R_GE_lineend {
Expand All @@ -723,7 +727,6 @@ pub enum R_GE_lineend {
GE_SQUARE_CAP = 3,
}
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum R_GE_linejoin {
GE_ROUND_JOIN = 1,
Expand Down Expand Up @@ -1012,7 +1015,6 @@ pub struct _DevDesc {
pub reserved: [::std::os::raw::c_char; 64usize],
}
#[repr(i32)]
#[non_exhaustive]
#[doc = "These give the indices of some known keys"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum R_KeyName {
Expand Down Expand Up @@ -1041,7 +1043,6 @@ pub enum R_KeyName {
knDEL = 21,
}
#[repr(u32)]
#[non_exhaustive]
#[doc = "These are the three possible mouse events"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum R_MouseEvent {
Expand Down Expand Up @@ -1128,7 +1129,6 @@ pub type d2fcn_p = ::std::option::Option<
),
>;
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum RNGtype {
WICHMANN_HILL = 0,
Expand All @@ -1141,7 +1141,6 @@ pub enum RNGtype {
LECUYER_CMRG = 7,
}
#[repr(u32)]
#[non_exhaustive]
#[doc = "Different kinds of \"N(0,1)\" generators :"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum N01type {
Expand All @@ -1153,7 +1152,6 @@ pub enum N01type {
KINDERMAN_RAMAGE = 5,
}
#[repr(u32)]
#[non_exhaustive]
#[doc = "Different ways to generate discrete uniform samples"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum Sampletype {
Expand Down Expand Up @@ -1254,9 +1252,6 @@ extern "C" {
arg3: ::std::os::raw::c_int,
);
pub fn Rf_setRVector(arg1: *mut f64, arg2: ::std::os::raw::c_int, arg3: f64);
pub fn Rf_StringFalse(arg1: *const ::std::os::raw::c_char) -> Rboolean;
pub fn Rf_StringTrue(arg1: *const ::std::os::raw::c_char) -> Rboolean;
pub fn Rf_isBlankString(arg1: *const ::std::os::raw::c_char) -> Rboolean;
#[doc = "These two are guaranteed to use '.' as the decimal point,\nand to accept \"NA\"."]
pub fn R_atof(str_: *const ::std::os::raw::c_char) -> f64;
pub fn R_strtod(c: *const ::std::os::raw::c_char, end: *mut *mut ::std::os::raw::c_char)
Expand Down Expand Up @@ -1686,7 +1681,6 @@ extern "C" {
pub fn R_tryEval(arg1: SEXP, arg2: SEXP, arg3: *mut ::std::os::raw::c_int) -> SEXP;
pub fn R_tryEvalSilent(arg1: SEXP, arg2: SEXP, arg3: *mut ::std::os::raw::c_int) -> SEXP;
pub fn R_GetCurrentEnv() -> SEXP;
pub fn Rf_isS4(arg1: SEXP) -> Rboolean;
pub fn Rf_asS4(arg1: SEXP, arg2: Rboolean, arg3: ::std::os::raw::c_int) -> SEXP;
pub fn Rf_S3Class(arg1: SEXP) -> SEXP;
pub fn Rf_isBasicClass(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
Expand Down Expand Up @@ -1728,8 +1722,6 @@ extern "C" {
pub fn R_WeakRefKey(w: SEXP) -> SEXP;
pub fn R_WeakRefValue(w: SEXP) -> SEXP;
pub fn R_RunWeakRefFinalizer(w: SEXP);
pub fn R_PromiseExpr(arg1: SEXP) -> SEXP;
pub fn R_ClosureExpr(arg1: SEXP) -> SEXP;
pub fn R_BytecodeExpr(e: SEXP) -> SEXP;
#[doc = "Protected evaluation"]
pub fn R_ToplevelExec(
Expand Down Expand Up @@ -2040,31 +2032,7 @@ extern "C" {
#[doc = "stuff that probably shouldn't be in the API but is getting used"]
pub fn SET_TYPEOF(x: SEXP, v: ::std::os::raw::c_int);
pub fn SET_OBJECT(x: SEXP, v: ::std::os::raw::c_int);
pub fn SET_S4_OBJECT(x: SEXP);
pub fn UNSET_S4_OBJECT(x: SEXP);
pub fn R_curErrorBuf() -> *const ::std::os::raw::c_char;
pub fn IS_SCALAR(x: SEXP, type_: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
pub fn Rf_psmatch(
arg1: *const ::std::os::raw::c_char,
arg2: *const ::std::os::raw::c_char,
arg3: Rboolean,
) -> Rboolean;
pub fn SETLENGTH(x: SEXP, v: R_xlen_t);
pub fn SET_TRUELENGTH(x: SEXP, v: R_xlen_t);
pub fn SETLEVELS(x: SEXP, v: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
pub fn SET_ENVFLAGS(x: SEXP, v: ::std::os::raw::c_int);
pub fn SET_FRAME(x: SEXP, v: SEXP);
pub fn SET_ENCLOS(x: SEXP, v: SEXP);
pub fn SET_HASHTAB(x: SEXP, v: SEXP);
pub fn SET_PRENV(x: SEXP, v: SEXP);
pub fn SET_PRVALUE(x: SEXP, v: SEXP);
pub fn SET_PRCODE(x: SEXP, v: SEXP);
pub fn STDVEC_DATAPTR(x: SEXP) -> *mut ::std::os::raw::c_void;
pub fn IS_GROWABLE(x: SEXP) -> ::std::os::raw::c_int;
pub fn SET_GROWABLE_BIT(x: SEXP);
pub fn SET_NAMED(x: SEXP, v: ::std::os::raw::c_int);
#[doc = "used by BIOC::matter; mightbe reasonable to include in API"]
pub fn R_tryWrap(arg1: SEXP) -> SEXP;
pub fn R_FlushConsole();
pub fn Rf_onintr();
pub fn Rf_onintrNoResume();
Expand Down
24 changes: 13 additions & 11 deletions bindings/bindings-linux-aarch64-R4.5-devel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ pub const R_MAJOR: &[u8; 2] = b"4\0";
pub const R_MINOR: &[u8; 4] = b"5.0\0";
pub const R_STATUS: &[u8; 29] = b"Under development (unstable)\0";
pub const R_YEAR: &[u8; 5] = b"2024\0";
pub const R_MONTH: &[u8; 3] = b"05\0";
pub const R_DAY: &[u8; 3] = b"08\0";
pub const R_SVN_REVISION: u32 = 86528;
pub const R_MONTH: &[u8; 3] = b"06\0";
pub const R_DAY: &[u8; 3] = b"11\0";
pub const R_SVN_REVISION: u32 = 86723;
pub const R_GE_definitions: u32 = 13;
pub const R_GE_deviceClip: u32 = 14;
pub const R_GE_group: u32 = 15;
Expand Down Expand Up @@ -1359,6 +1359,8 @@ extern "C" {
pub fn Rf_isEnvironment(s: SEXP) -> Rboolean;
pub fn Rf_isString(s: SEXP) -> Rboolean;
pub fn Rf_isObject(s: SEXP) -> Rboolean;
pub fn MAYBE_SHARED(x: SEXP) -> ::std::os::raw::c_int;
pub fn NO_REFERENCES(x: SEXP) -> ::std::os::raw::c_int;
#[doc = "General Cons Cell Attributes"]
pub fn ATTRIB(x: SEXP) -> SEXP;
pub fn OBJECT(x: SEXP) -> ::std::os::raw::c_int;
Expand Down Expand Up @@ -1393,6 +1395,7 @@ extern "C" {
pub fn SET_VECTOR_ELT(x: SEXP, i: R_xlen_t, v: SEXP) -> SEXP;
pub fn STRING_PTR(x: SEXP) -> *mut SEXP;
pub fn STRING_PTR_RO(x: SEXP) -> *const SEXP;
pub fn VECTOR_PTR_RO(x: SEXP) -> *const SEXP;
pub fn INTEGER_GET_REGION(
sx: SEXP,
i: R_xlen_t,
Expand Down Expand Up @@ -1449,6 +1452,10 @@ extern "C" {
pub fn SET_FORMALS(x: SEXP, v: SEXP);
pub fn SET_BODY(x: SEXP, v: SEXP);
pub fn SET_CLOENV(x: SEXP, v: SEXP);
pub fn R_mkClosure(arg1: SEXP, arg2: SEXP, arg3: SEXP) -> SEXP;
pub fn R_ClosureFormals(arg1: SEXP) -> SEXP;
pub fn R_ClosureBody(arg1: SEXP) -> SEXP;
pub fn R_ClosureEnv(arg1: SEXP) -> SEXP;
#[doc = "Symbol Access Functions"]
pub fn PRINTNAME(x: SEXP) -> SEXP;
pub fn SYMVALUE(x: SEXP) -> SEXP;
Expand All @@ -1459,6 +1466,7 @@ extern "C" {
pub fn ENCLOS(x: SEXP) -> SEXP;
pub fn HASHTAB(x: SEXP) -> SEXP;
pub fn ENVFLAGS(x: SEXP) -> ::std::os::raw::c_int;
pub fn R_ParentEnv(arg1: SEXP) -> SEXP;
#[doc = "Promise Access Functions"]
pub fn PRCODE(x: SEXP) -> SEXP;
pub fn PRENV(x: SEXP) -> SEXP;
Expand Down Expand Up @@ -1603,6 +1611,7 @@ extern "C" {
arg2: ::std::os::raw::c_int,
arg3: ::std::os::raw::c_int,
) -> SEXP;
pub fn Rf_allocLang(arg1: ::std::os::raw::c_int) -> SEXP;
pub fn Rf_allocList(arg1: ::std::os::raw::c_int) -> SEXP;
pub fn Rf_allocS4Object() -> SEXP;
pub fn Rf_allocSExp(arg1: SEXPTYPE) -> SEXP;
Expand Down Expand Up @@ -1712,12 +1721,6 @@ extern "C" {
ce_out: cetype_t,
subst: ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_char;
pub fn Rf_reEnc3(
x: *const ::std::os::raw::c_char,
fromcode: *const ::std::os::raw::c_char,
tocode: *const ::std::os::raw::c_char,
subst: ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_char;
#[doc = "Calling a function with arguments evaluated"]
pub fn R_forceAndCall(e: SEXP, n: ::std::os::raw::c_int, rho: SEXP) -> SEXP;
#[doc = "External pointer interface"]
Expand Down Expand Up @@ -1876,7 +1879,6 @@ extern "C" {
);
pub fn R_Serialize(s: SEXP, ops: R_outpstream_t);
pub fn R_Unserialize(ips: R_inpstream_t) -> SEXP;
pub fn R_SerializeInfo(ips: R_inpstream_t) -> SEXP;
#[doc = "slot management (in attrib.c)"]
pub fn R_do_slot(obj: SEXP, name: SEXP) -> SEXP;
pub fn R_do_slot_assign(obj: SEXP, name: SEXP, value: SEXP) -> SEXP;
Expand Down Expand Up @@ -1907,7 +1909,6 @@ extern "C" {
pub fn R_NewPreciousMSet(arg1: ::std::os::raw::c_int) -> SEXP;
pub fn R_PreserveInMSet(x: SEXP, mset: SEXP);
pub fn R_ReleaseFromMSet(x: SEXP, mset: SEXP);
pub fn R_ReleaseMSet(mset: SEXP, keepSize: ::std::os::raw::c_int);
#[doc = "Shutdown actions"]
pub fn R_dot_Last();
pub fn R_RunExitFinalizers();
Expand Down Expand Up @@ -1936,6 +1937,7 @@ extern "C" {
pub fn Rf_elt(arg1: SEXP, arg2: ::std::os::raw::c_int) -> SEXP;
pub fn Rf_inherits(arg1: SEXP, arg2: *const ::std::os::raw::c_char) -> Rboolean;
pub fn Rf_isArray(arg1: SEXP) -> Rboolean;
pub fn Rf_isDataFrame(arg1: SEXP) -> Rboolean;
pub fn Rf_isFactor(arg1: SEXP) -> Rboolean;
pub fn Rf_isFrame(arg1: SEXP) -> Rboolean;
pub fn Rf_isFunction(arg1: SEXP) -> Rboolean;
Expand Down
Loading

0 comments on commit b26b858

Please sign in to comment.