Skip to content

Commit 6355e08

Browse files
Update bindings (#168)
1 parent 4ad9180 commit 6355e08

13 files changed

+259
-453
lines changed

bindings/bindings-linux-aarch64-R4.2.rs

Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,6 @@ where
8585
}
8686
}
8787
}
88-
pub const M_E: f64 = 2.718281828459045;
89-
pub const M_LOG2E: f64 = 1.4426950408889634;
90-
pub const M_LOG10E: f64 = 0.4342944819032518;
91-
pub const M_LN2: f64 = 0.6931471805599453;
92-
pub const M_LN10: f64 = 2.302585092994046;
93-
pub const M_PI: f64 = 3.141592653589793;
94-
pub const M_PI_2: f64 = 1.5707963267948966;
95-
pub const M_PI_4: f64 = 0.7853981633974483;
96-
pub const M_1_PI: f64 = 0.3183098861837907;
97-
pub const M_2_PI: f64 = 0.6366197723675814;
98-
pub const M_2_SQRTPI: f64 = 1.1283791670955126;
99-
pub const M_SQRT2: f64 = 1.4142135623730951;
100-
pub const M_SQRT1_2: f64 = 0.7071067811865476;
10188
pub const SINGLESXP: u32 = 302;
10289
pub const HAVE_F77_UNDERSCORE: u32 = 1;
10390
pub const IEEE_754: u32 = 1;
@@ -638,7 +625,7 @@ extern "C" {
638625
pub const Rboolean_FALSE: Rboolean = 0;
639626
#[doc = ", MAYBE"]
640627
pub const Rboolean_TRUE: Rboolean = 1;
641-
pub type Rboolean = ::std::os::raw::c_uint;
628+
pub type Rboolean = u32;
642629
extern "C" {
643630
pub fn Rf_error(arg1: *const ::std::os::raw::c_char, ...) -> !;
644631
}
@@ -1032,7 +1019,7 @@ pub const NativeSymbolType_R_C_SYM: NativeSymbolType = 1;
10321019
pub const NativeSymbolType_R_CALL_SYM: NativeSymbolType = 2;
10331020
pub const NativeSymbolType_R_FORTRAN_SYM: NativeSymbolType = 3;
10341021
pub const NativeSymbolType_R_EXTERNAL_SYM: NativeSymbolType = 4;
1035-
pub type NativeSymbolType = ::std::os::raw::c_uint;
1022+
pub type NativeSymbolType = u32;
10361023
extern "C" {
10371024
pub fn R_FindSymbol(
10381025
arg1: *const ::std::os::raw::c_char,
@@ -1193,9 +1180,6 @@ extern "C" {
11931180
extern "C" {
11941181
pub fn STRING_PTR_RO(x: SEXP) -> *const SEXP;
11951182
}
1196-
extern "C" {
1197-
pub fn VECTOR_PTR(x: SEXP) -> !;
1198-
}
11991183
extern "C" {
12001184
pub fn INTEGER_GET_REGION(
12011185
sx: SEXP,
@@ -1852,7 +1836,7 @@ pub const nchar_type_Bytes: nchar_type = 0;
18521836
pub const nchar_type_Chars: nchar_type = 1;
18531837
pub const nchar_type_Width: nchar_type = 2;
18541838
#[doc = "../main/character.c :"]
1855-
pub type nchar_type = ::std::os::raw::c_uint;
1839+
pub type nchar_type = u32;
18561840
extern "C" {
18571841
pub fn R_nchar(
18581842
string: SEXP,
@@ -1935,7 +1919,7 @@ pub const cetype_t_CE_BYTES: cetype_t = 3;
19351919
pub const cetype_t_CE_SYMBOL: cetype_t = 5;
19361920
pub const cetype_t_CE_ANY: cetype_t = 99;
19371921
#[doc = "cetype_t is an identifier reseved by POSIX, but it is\nwell established as public. Could remap by a #define though"]
1938-
pub type cetype_t = ::std::os::raw::c_uint;
1922+
pub type cetype_t = u32;
19391923
extern "C" {
19401924
pub fn Rf_getCharCE(arg1: SEXP) -> cetype_t;
19411925
}
@@ -2182,7 +2166,7 @@ pub const R_pstream_format_t_R_pstream_ascii_format: R_pstream_format_t = 1;
21822166
pub const R_pstream_format_t_R_pstream_binary_format: R_pstream_format_t = 2;
21832167
pub const R_pstream_format_t_R_pstream_xdr_format: R_pstream_format_t = 3;
21842168
pub const R_pstream_format_t_R_pstream_asciihex_format: R_pstream_format_t = 4;
2185-
pub type R_pstream_format_t = ::std::os::raw::c_uint;
2169+
pub type R_pstream_format_t = u32;
21862170
pub type R_outpstream_t = *mut R_outpstream_st;
21872171
#[repr(C)]
21882172
#[derive(Debug, Copy, Clone)]
@@ -3039,7 +3023,7 @@ pub const SA_TYPE_SA_SAVE: SA_TYPE = 4;
30393023
pub const SA_TYPE_SA_SAVEASK: SA_TYPE = 5;
30403024
pub const SA_TYPE_SA_SUICIDE: SA_TYPE = 6;
30413025
#[doc = "Startup Actions"]
3042-
pub type SA_TYPE = ::std::os::raw::c_uint;
3026+
pub type SA_TYPE = u32;
30433027
#[repr(C)]
30443028
#[derive(Debug, Copy, Clone)]
30453029
pub struct structRstart {
@@ -4070,7 +4054,7 @@ pub const ParseStatus_PARSE_INCOMPLETE: ParseStatus = 2;
40704054
pub const ParseStatus_PARSE_ERROR: ParseStatus = 3;
40714055
pub const ParseStatus_PARSE_EOF: ParseStatus = 4;
40724056
#[doc = "PARSE_NULL will not be returned by R_ParseVector"]
4073-
pub type ParseStatus = ::std::os::raw::c_uint;
4057+
pub type ParseStatus = u32;
40744058
extern "C" {
40754059
pub fn R_ParseVector(
40764060
arg1: SEXP,
@@ -4443,7 +4427,7 @@ pub const GEUnit_GE_NDC: GEUnit = 1;
44434427
pub const GEUnit_GE_INCHES: GEUnit = 2;
44444428
pub const GEUnit_GE_CM: GEUnit = 3;
44454429
#[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 (!!)"]
4446-
pub type GEUnit = ::std::os::raw::c_uint;
4430+
pub type GEUnit = u32;
44474431
#[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"]
44484432
pub const GEevent_GE_InitState: GEevent = 0;
44494433
#[doc = "This event gives the registered system a chance to undo\n anything done in the initialisation."]
@@ -4462,16 +4446,16 @@ pub const GEevent_GE_RestoreSnapshotState: GEevent = 5;
44624446
pub const GEevent_GE_CheckPlot: GEevent = 7;
44634447
#[doc = "The device wants to scale the current pointsize\n (for scaling an image)\n This is not a nice general solution, but a quick fix for\n the Windows device."]
44644448
pub const GEevent_GE_ScalePS: GEevent = 8;
4465-
pub type GEevent = ::std::os::raw::c_uint;
4449+
pub type GEevent = u32;
44664450
pub const R_GE_lineend_GE_ROUND_CAP: R_GE_lineend = 1;
44674451
pub const R_GE_lineend_GE_BUTT_CAP: R_GE_lineend = 2;
44684452
pub const R_GE_lineend_GE_SQUARE_CAP: R_GE_lineend = 3;
44694453
#[doc = "Some line end/join constants"]
4470-
pub type R_GE_lineend = ::std::os::raw::c_uint;
4454+
pub type R_GE_lineend = u32;
44714455
pub const R_GE_linejoin_GE_ROUND_JOIN: R_GE_linejoin = 1;
44724456
pub const R_GE_linejoin_GE_MITRE_JOIN: R_GE_linejoin = 2;
44734457
pub const R_GE_linejoin_GE_BEVEL_JOIN: R_GE_linejoin = 3;
4474-
pub type R_GE_linejoin = ::std::os::raw::c_uint;
4458+
pub type R_GE_linejoin = u32;
44754459
#[doc = "A structure containing graphical parameters\n\n This is how graphical parameters are passed from graphics systems\n to the graphics engine AND from the graphics engine to graphics\n devices.\n\n Devices are not *required* to honour graphical parameters\n (e.g., alpha transparency is going to be tough for some)"]
44764460
#[repr(C)]
44774461
#[derive(Debug, Copy, Clone)]
@@ -5801,12 +5785,12 @@ pub const R_KeyName_knHOME: R_KeyName = 19;
58015785
pub const R_KeyName_knINS: R_KeyName = 20;
58025786
pub const R_KeyName_knDEL: R_KeyName = 21;
58035787
#[doc = "These give the indices of some known keys"]
5804-
pub type R_KeyName = ::std::os::raw::c_int;
5788+
pub type R_KeyName = i32;
58055789
pub const R_MouseEvent_meMouseDown: R_MouseEvent = 0;
58065790
pub const R_MouseEvent_meMouseUp: R_MouseEvent = 1;
58075791
pub const R_MouseEvent_meMouseMove: R_MouseEvent = 2;
58085792
#[doc = "These are the three possible mouse events"]
5809-
pub type R_MouseEvent = ::std::os::raw::c_uint;
5793+
pub type R_MouseEvent = u32;
58105794
extern "C" {
58115795
pub fn Rf_doMouseEvent(
58125796
dd: pDevDesc,
@@ -7737,19 +7721,19 @@ pub const RNGtype_KNUTH_TAOCP: RNGtype = 4;
77377721
pub const RNGtype_USER_UNIF: RNGtype = 5;
77387722
pub const RNGtype_KNUTH_TAOCP2: RNGtype = 6;
77397723
pub const RNGtype_LECUYER_CMRG: RNGtype = 7;
7740-
pub type RNGtype = ::std::os::raw::c_uint;
7724+
pub type RNGtype = u32;
77417725
pub const N01type_BUGGY_KINDERMAN_RAMAGE: N01type = 0;
77427726
pub const N01type_AHRENS_DIETER: N01type = 1;
77437727
pub const N01type_BOX_MULLER: N01type = 2;
77447728
pub const N01type_USER_NORM: N01type = 3;
77457729
pub const N01type_INVERSION: N01type = 4;
77467730
pub const N01type_KINDERMAN_RAMAGE: N01type = 5;
77477731
#[doc = "Different kinds of \"N(0,1)\" generators :"]
7748-
pub type N01type = ::std::os::raw::c_uint;
7732+
pub type N01type = u32;
77497733
pub const Sampletype_ROUNDING: Sampletype = 0;
77507734
pub const Sampletype_REJECTION: Sampletype = 1;
77517735
#[doc = "Different ways to generate discrete uniform samples"]
7752-
pub type Sampletype = ::std::os::raw::c_uint;
7736+
pub type Sampletype = u32;
77537737
extern "C" {
77547738
pub fn R_sample_kind() -> Sampletype;
77557739
}

bindings/bindings-linux-aarch64-R4.3.rs

Lines changed: 19 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
/* automatically generated by rust-bindgen 0.64.0 */
2+
3+
/* libR-sys version: 0.4.0 */
14
/* bindgen clang version: Ubuntu clang version 14.0.0-1ubuntu1 */
25
/* clang-rs version: Ubuntu clang version 14.0.0-1ubuntu1 */
36
/* r version: 4.3.0 */
4-
/* automatically generated by rust-bindgen 0.64.0 */
57

68
#[repr(C)]
79
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
@@ -83,19 +85,6 @@ where
8385
}
8486
}
8587
}
86-
pub const M_E: f64 = 2.718281828459045;
87-
pub const M_LOG2E: f64 = 1.4426950408889634;
88-
pub const M_LOG10E: f64 = 0.4342944819032518;
89-
pub const M_LN2: f64 = 0.6931471805599453;
90-
pub const M_LN10: f64 = 2.302585092994046;
91-
pub const M_PI: f64 = 3.141592653589793;
92-
pub const M_PI_2: f64 = 1.5707963267948966;
93-
pub const M_PI_4: f64 = 0.7853981633974483;
94-
pub const M_1_PI: f64 = 0.3183098861837907;
95-
pub const M_2_PI: f64 = 0.6366197723675814;
96-
pub const M_2_SQRTPI: f64 = 1.1283791670955126;
97-
pub const M_SQRT2: f64 = 1.4142135623730951;
98-
pub const M_SQRT1_2: f64 = 0.7071067811865476;
9988
pub const SINGLESXP: u32 = 302;
10089
pub const HAVE_F77_UNDERSCORE: u32 = 1;
10190
pub const IEEE_754: u32 = 1;
@@ -641,7 +630,7 @@ extern "C" {
641630
pub const Rboolean_FALSE: Rboolean = 0;
642631
#[doc = ", MAYBE"]
643632
pub const Rboolean_TRUE: Rboolean = 1;
644-
pub type Rboolean = ::std::os::raw::c_uint;
633+
pub type Rboolean = u32;
645634
extern "C" {
646635
pub fn Rf_error(arg1: *const ::std::os::raw::c_char, ...) -> !;
647636
}
@@ -1035,7 +1024,7 @@ pub const NativeSymbolType_R_C_SYM: NativeSymbolType = 1;
10351024
pub const NativeSymbolType_R_CALL_SYM: NativeSymbolType = 2;
10361025
pub const NativeSymbolType_R_FORTRAN_SYM: NativeSymbolType = 3;
10371026
pub const NativeSymbolType_R_EXTERNAL_SYM: NativeSymbolType = 4;
1038-
pub type NativeSymbolType = ::std::os::raw::c_uint;
1027+
pub type NativeSymbolType = u32;
10391028
extern "C" {
10401029
pub fn R_FindSymbol(
10411030
arg1: *const ::std::os::raw::c_char,
@@ -1196,9 +1185,6 @@ extern "C" {
11961185
extern "C" {
11971186
pub fn STRING_PTR_RO(x: SEXP) -> *const SEXP;
11981187
}
1199-
extern "C" {
1200-
pub fn VECTOR_PTR(x: SEXP) -> !;
1201-
}
12021188
extern "C" {
12031189
pub fn INTEGER_GET_REGION(
12041190
sx: SEXP,
@@ -1858,7 +1844,7 @@ pub const nchar_type_Bytes: nchar_type = 0;
18581844
pub const nchar_type_Chars: nchar_type = 1;
18591845
pub const nchar_type_Width: nchar_type = 2;
18601846
#[doc = "../main/character.c :"]
1861-
pub type nchar_type = ::std::os::raw::c_uint;
1847+
pub type nchar_type = u32;
18621848
extern "C" {
18631849
pub fn R_nchar(
18641850
string: SEXP,
@@ -1944,7 +1930,7 @@ pub const cetype_t_CE_BYTES: cetype_t = 3;
19441930
pub const cetype_t_CE_SYMBOL: cetype_t = 5;
19451931
pub const cetype_t_CE_ANY: cetype_t = 99;
19461932
#[doc = "cetype_t is an identifier reseved by POSIX, but it is\nwell established as public. Could remap by a #define though"]
1947-
pub type cetype_t = ::std::os::raw::c_uint;
1933+
pub type cetype_t = u32;
19481934
extern "C" {
19491935
pub fn Rf_getCharCE(arg1: SEXP) -> cetype_t;
19501936
}
@@ -2200,7 +2186,7 @@ pub const R_pstream_format_t_R_pstream_ascii_format: R_pstream_format_t = 1;
22002186
pub const R_pstream_format_t_R_pstream_binary_format: R_pstream_format_t = 2;
22012187
pub const R_pstream_format_t_R_pstream_xdr_format: R_pstream_format_t = 3;
22022188
pub const R_pstream_format_t_R_pstream_asciihex_format: R_pstream_format_t = 4;
2203-
pub type R_pstream_format_t = ::std::os::raw::c_uint;
2189+
pub type R_pstream_format_t = u32;
22042190
pub type R_outpstream_t = *mut R_outpstream_st;
22052191
#[repr(C)]
22062192
#[derive(Debug, Copy, Clone)]
@@ -3057,7 +3043,7 @@ pub const SA_TYPE_SA_SAVE: SA_TYPE = 4;
30573043
pub const SA_TYPE_SA_SAVEASK: SA_TYPE = 5;
30583044
pub const SA_TYPE_SA_SUICIDE: SA_TYPE = 6;
30593045
#[doc = "Startup Actions"]
3060-
pub type SA_TYPE = ::std::os::raw::c_uint;
3046+
pub type SA_TYPE = u32;
30613047
#[repr(C)]
30623048
#[derive(Debug, Copy, Clone)]
30633049
pub struct structRstart {
@@ -4088,7 +4074,7 @@ pub const ParseStatus_PARSE_INCOMPLETE: ParseStatus = 2;
40884074
pub const ParseStatus_PARSE_ERROR: ParseStatus = 3;
40894075
pub const ParseStatus_PARSE_EOF: ParseStatus = 4;
40904076
#[doc = "PARSE_NULL will not be returned by R_ParseVector"]
4091-
pub type ParseStatus = ::std::os::raw::c_uint;
4077+
pub type ParseStatus = u32;
40924078
extern "C" {
40934079
pub fn R_ParseVector(
40944080
arg1: SEXP,
@@ -4478,7 +4464,7 @@ pub const GEUnit_GE_NDC: GEUnit = 1;
44784464
pub const GEUnit_GE_INCHES: GEUnit = 2;
44794465
pub const GEUnit_GE_CM: GEUnit = 3;
44804466
#[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 (!!)"]
4481-
pub type GEUnit = ::std::os::raw::c_uint;
4467+
pub type GEUnit = u32;
44824468
#[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"]
44834469
pub const GEevent_GE_InitState: GEevent = 0;
44844470
#[doc = "This event gives the registered system a chance to undo\n anything done in the initialisation."]
@@ -4497,16 +4483,16 @@ pub const GEevent_GE_RestoreSnapshotState: GEevent = 5;
44974483
pub const GEevent_GE_CheckPlot: GEevent = 7;
44984484
#[doc = "The device wants to scale the current pointsize\n (for scaling an image)\n This is not a nice general solution, but a quick fix for\n the Windows device."]
44994485
pub const GEevent_GE_ScalePS: GEevent = 8;
4500-
pub type GEevent = ::std::os::raw::c_uint;
4486+
pub type GEevent = u32;
45014487
pub const R_GE_lineend_GE_ROUND_CAP: R_GE_lineend = 1;
45024488
pub const R_GE_lineend_GE_BUTT_CAP: R_GE_lineend = 2;
45034489
pub const R_GE_lineend_GE_SQUARE_CAP: R_GE_lineend = 3;
45044490
#[doc = "Some line end/join constants"]
4505-
pub type R_GE_lineend = ::std::os::raw::c_uint;
4491+
pub type R_GE_lineend = u32;
45064492
pub const R_GE_linejoin_GE_ROUND_JOIN: R_GE_linejoin = 1;
45074493
pub const R_GE_linejoin_GE_MITRE_JOIN: R_GE_linejoin = 2;
45084494
pub const R_GE_linejoin_GE_BEVEL_JOIN: R_GE_linejoin = 3;
4509-
pub type R_GE_linejoin = ::std::os::raw::c_uint;
4495+
pub type R_GE_linejoin = u32;
45104496
#[doc = "A structure containing graphical parameters\n\n This is how graphical parameters are passed from graphics systems\n to the graphics engine AND from the graphics engine to graphics\n devices.\n\n Devices are not *required* to honour graphical parameters\n (e.g., alpha transparency is going to be tough for some)"]
45114497
#[repr(C)]
45124498
#[derive(Debug, Copy, Clone)]
@@ -5859,12 +5845,12 @@ pub const R_KeyName_knHOME: R_KeyName = 19;
58595845
pub const R_KeyName_knINS: R_KeyName = 20;
58605846
pub const R_KeyName_knDEL: R_KeyName = 21;
58615847
#[doc = "These give the indices of some known keys"]
5862-
pub type R_KeyName = ::std::os::raw::c_int;
5848+
pub type R_KeyName = i32;
58635849
pub const R_MouseEvent_meMouseDown: R_MouseEvent = 0;
58645850
pub const R_MouseEvent_meMouseUp: R_MouseEvent = 1;
58655851
pub const R_MouseEvent_meMouseMove: R_MouseEvent = 2;
58665852
#[doc = "These are the three possible mouse events"]
5867-
pub type R_MouseEvent = ::std::os::raw::c_uint;
5853+
pub type R_MouseEvent = u32;
58685854
extern "C" {
58695855
pub fn Rf_doMouseEvent(
58705856
dd: pDevDesc,
@@ -7942,19 +7928,19 @@ pub const RNGtype_KNUTH_TAOCP: RNGtype = 4;
79427928
pub const RNGtype_USER_UNIF: RNGtype = 5;
79437929
pub const RNGtype_KNUTH_TAOCP2: RNGtype = 6;
79447930
pub const RNGtype_LECUYER_CMRG: RNGtype = 7;
7945-
pub type RNGtype = ::std::os::raw::c_uint;
7931+
pub type RNGtype = u32;
79467932
pub const N01type_BUGGY_KINDERMAN_RAMAGE: N01type = 0;
79477933
pub const N01type_AHRENS_DIETER: N01type = 1;
79487934
pub const N01type_BOX_MULLER: N01type = 2;
79497935
pub const N01type_USER_NORM: N01type = 3;
79507936
pub const N01type_INVERSION: N01type = 4;
79517937
pub const N01type_KINDERMAN_RAMAGE: N01type = 5;
79527938
#[doc = "Different kinds of \"N(0,1)\" generators :"]
7953-
pub type N01type = ::std::os::raw::c_uint;
7939+
pub type N01type = u32;
79547940
pub const Sampletype_ROUNDING: Sampletype = 0;
79557941
pub const Sampletype_REJECTION: Sampletype = 1;
79567942
#[doc = "Different ways to generate discrete uniform samples"]
7957-
pub type Sampletype = ::std::os::raw::c_uint;
7943+
pub type Sampletype = u32;
79587944
extern "C" {
79597945
pub fn R_sample_kind() -> Sampletype;
79607946
}

0 commit comments

Comments
 (0)