1pub mod altrep;
59
60use crate::sexp::SEXP;
66use crate::sexp_types::{R_CFinalizer_t, R_xlen_t, Rboolean, Rbyte, Rcomplex, SEXPTYPE, cetype_t};
67
68#[cfg(feature = "connections")]
76#[repr(C)]
77#[allow(non_camel_case_types)]
78pub struct Rconnection_impl(::std::os::raw::c_void);
79
80#[cfg(feature = "connections")]
86#[allow(non_camel_case_types)]
87pub type Rconnection = *mut Rconnection_impl;
88
89#[cfg(feature = "connections")]
101#[allow(non_upper_case_globals)]
102pub const R_CONNECTIONS_VERSION: ::std::os::raw::c_int = 1;
103
104use miniextendr_macros::r_ffi_checked;
107
108#[allow(clashing_extern_declarations)]
110#[allow(varargs_without_pattern)]
111unsafe extern "C-unwind" {
112 #[link_name = "Rf_error"]
114 pub fn Rf_error_unchecked(arg1: *const ::std::os::raw::c_char, ...) -> !;
115 #[link_name = "Rf_errorcall"]
117 pub fn Rf_errorcall_unchecked(arg1: SEXP, arg2: *const ::std::os::raw::c_char, ...) -> !;
118 #[link_name = "Rf_warning"]
120 pub fn Rf_warning_unchecked(arg1: *const ::std::os::raw::c_char, ...);
121 #[link_name = "Rprintf"]
123 pub fn Rprintf_unchecked(arg1: *const ::std::os::raw::c_char, ...);
124 #[link_name = "REprintf"]
126 pub fn REprintf_unchecked(arg1: *const ::std::os::raw::c_char, ...);
127}
128
129#[cfg(feature = "nonapi")]
131unsafe extern "C-unwind" {
132 #[allow(non_snake_case, dead_code)] pub(crate) fn R_curErrorBuf() -> *const ::std::os::raw::c_char;
148}
149
150#[cfg(feature = "nonapi")]
152unsafe extern "C-unwind" {
153 #[expect(dead_code, reason = "declared for future use")]
154 pub(crate) static ptr_R_WriteConsoleEx: Option<
155 unsafe extern "C-unwind" fn(
156 *const ::std::os::raw::c_char,
157 ::std::os::raw::c_int,
158 ::std::os::raw::c_int,
159 ),
160 >;
161}
162
163#[inline(always)]
171#[allow(non_snake_case)]
172pub unsafe fn Rf_error(
173 fmt: *const ::std::os::raw::c_char,
174 arg1: *const ::std::os::raw::c_char,
175) -> ! {
176 if !crate::worker::is_r_main_thread() {
177 {
::core::panicking::panic_fmt(format_args!("Rf_error called from non-main thread"));
};panic!("Rf_error called from non-main thread");
178 }
179 unsafe { Rf_error_unchecked(fmt, arg1) }
180}
181
182#[inline(always)]
190#[allow(non_snake_case)]
191pub unsafe fn Rf_errorcall(
192 call: SEXP,
193 fmt: *const ::std::os::raw::c_char,
194 arg1: *const ::std::os::raw::c_char,
195) -> ! {
196 if !crate::worker::is_r_main_thread() {
197 {
::core::panicking::panic_fmt(format_args!("Rf_errorcall called from non-main thread"));
};panic!("Rf_errorcall called from non-main thread");
198 }
199 unsafe { Rf_errorcall_unchecked(call, fmt, arg1) }
200}
201
202#[inline(always)]
209#[allow(non_snake_case)]
210pub unsafe fn Rf_warning(fmt: *const ::std::os::raw::c_char, arg1: *const ::std::os::raw::c_char) {
211 if !crate::worker::is_r_main_thread() {
212 {
::core::panicking::panic_fmt(format_args!("Rf_warning called from non-main thread"));
};panic!("Rf_warning called from non-main thread");
213 }
214 unsafe { Rf_warning_unchecked(fmt, arg1) }
215}
216
217#[inline(always)]
224#[allow(non_snake_case)]
225pub unsafe fn Rprintf(fmt: *const ::std::os::raw::c_char, arg1: *const ::std::os::raw::c_char) {
226 if !crate::worker::is_r_main_thread() {
227 {
::core::panicking::panic_fmt(format_args!("Rprintf called from non-main thread"));
};panic!("Rprintf called from non-main thread");
228 }
229 unsafe { Rprintf_unchecked(fmt, arg1) }
230}
231
232#[inline(always)]
239#[allow(non_snake_case)]
240pub unsafe fn REprintf(fmt: *const ::std::os::raw::c_char, arg1: *const ::std::os::raw::c_char) {
241 if !crate::worker::is_r_main_thread() {
242 {
::core::panicking::panic_fmt(format_args!("REprintf called from non-main thread"));
};panic!("REprintf called from non-main thread");
243 }
244 unsafe { REprintf_unchecked(fmt, arg1) }
245}
246
247#[allow(missing_docs)]
249#[allow(missing_docs)]
#[allow(clashing_extern_declarations)]
unsafe extern "C-unwind" {
#[doc = " The canonical R `NULL` value."]
pub static R_NilValue: SEXP;
#[doc(alias = "NA_STRING")]
#[doc = " Missing string singleton — encapsulated by SEXP::na_string()"]
pub static R_NaString: SEXP;
#[doc = " Empty string CHARSXP — encapsulated by SEXP::blank_string()"]
pub static R_BlankString: SEXP;
#[doc = " Symbol for `names` attribute."]
pub static R_NamesSymbol: SEXP;
pub static R_DimSymbol: SEXP;
pub static R_DimNamesSymbol: SEXP;
pub static R_ClassSymbol: SEXP;
pub static R_RowNamesSymbol: SEXP;
pub static R_LevelsSymbol: SEXP;
pub static R_TspSymbol: SEXP;
#[doc = " Global environment (`.GlobalEnv`)."]
pub static R_GlobalEnv: SEXP;
#[doc = " Base package namespace environment."]
pub static R_BaseEnv: SEXP;
#[doc = " Empty root environment."]
pub static R_EmptyEnv: SEXP;
#[doc =
" Base package namespace — encapsulated by SEXP::base_namespace()"]
pub static R_BaseNamespace: SEXP;
#[doc = " The \"missing argument\" sentinel value."]
#[doc = ""]
#[doc =
" When an R function is called without providing a value for a formal"]
#[doc =
" argument, R passes `R_MissingArg` as a placeholder. This is different"]
#[doc =
" from `R_NilValue` (NULL) - a missing argument means \"not provided\","]
#[doc = " while NULL is an explicit value."]
#[doc = ""]
#[doc = " In R: `f <- function(x) missing(x); f()` returns `TRUE`."]
#[doc = " Encapsulated by SEXP::missing_arg()"]
pub static R_MissingArg: SEXP;
#[doc =
" Sentinel returned by `R_getVarEx` (via its `ifnotfound` argument) when"]
#[doc = " the symbol has no binding in the searched frame(s)."]
pub static R_UnboundValue: SEXP;
#[doc = "Unchecked FFI binding for `R_FlushConsole`."]
#[doc = "Generated from source location line 296, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_FlushConsole"]
pub(crate) fn R_FlushConsole_unchecked();
#[doc(alias = "mkChar")]
#[doc = "Unchecked FFI binding for `Rf_mkChar`."]
#[doc = "Generated from source location line 312, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_mkChar"]
pub fn Rf_mkChar_unchecked(s: *const ::std::os::raw::c_char)
-> SEXP;
#[doc(alias = "mkCharLen")]
#[doc = "Unchecked FFI binding for `Rf_mkCharLen`."]
#[doc = "Generated from source location line 314, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_mkCharLen"]
pub fn Rf_mkCharLen_unchecked(s: *const ::std::os::raw::c_char, len: i32)
-> SEXP;
#[doc(alias = "mkCharLenCE")]
#[doc = "Unchecked FFI binding for `Rf_mkCharLenCE`."]
#[doc = "Generated from source location line 316, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_mkCharLenCE"]
pub fn Rf_mkCharLenCE_unchecked(x: *const ::std::os::raw::c_char,
len: ::std::os::raw::c_int, ce: cetype_t)
-> SEXP;
#[doc(alias = "xlength")]
#[doc(alias = "XLENGTH")]
#[doc = "Unchecked FFI binding for `Rf_xlength`."]
#[doc = "Generated from source location line 323, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_xlength"]
pub fn Rf_xlength_unchecked(x: SEXP)
-> R_xlen_t;
#[doc(alias = "translateCharUTF8")]
#[doc = "Unchecked FFI binding for `Rf_translateCharUTF8`."]
#[doc = "Generated from source location line 325, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_translateCharUTF8"]
pub fn Rf_translateCharUTF8_unchecked(x: SEXP)
-> *const ::std::os::raw::c_char;
#[doc(alias = "getCharCE")]
#[doc = "Unchecked FFI binding for `Rf_getCharCE`."]
#[doc = "Generated from source location line 327, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_getCharCE"]
pub fn Rf_getCharCE_unchecked(x: SEXP)
-> cetype_t;
#[doc(alias = "charIsASCII")]
#[doc = "Unchecked FFI binding for `Rf_charIsASCII`."]
#[doc = "Generated from source location line 329, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_charIsASCII"]
pub fn Rf_charIsASCII_unchecked(x: SEXP)
-> Rboolean;
#[doc(alias = "charIsUTF8")]
#[doc = "Unchecked FFI binding for `Rf_charIsUTF8`."]
#[doc = "Generated from source location line 331, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_charIsUTF8"]
pub fn Rf_charIsUTF8_unchecked(x: SEXP)
-> Rboolean;
#[doc(alias = "charIsLatin1")]
#[doc = "Unchecked FFI binding for `Rf_charIsLatin1`."]
#[doc = "Generated from source location line 333, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_charIsLatin1"]
pub fn Rf_charIsLatin1_unchecked(x: SEXP)
-> Rboolean;
#[doc = "Unchecked FFI binding for `R_MakeUnwindCont`."]
#[doc = "Generated from source location line 336, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_MakeUnwindCont"]
pub(crate) fn R_MakeUnwindCont_unchecked()
-> SEXP;
#[doc = "Unchecked FFI binding for `R_ContinueUnwind`."]
#[doc = "Generated from source location line 337, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_ContinueUnwind"]
pub(crate) fn R_ContinueUnwind_unchecked(cont: SEXP)
-> !;
#[doc = "Unchecked FFI binding for `R_UnwindProtect`."]
#[doc = "Generated from source location line 338, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_UnwindProtect"]
pub(crate) fn R_UnwindProtect_unchecked(fun:
::std::option::Option<unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void)
-> SEXP>, fun_data: *mut ::std::os::raw::c_void,
cleanfun:
::std::option::Option<unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void,
Rboolean)>, cleanfun_data: *mut ::std::os::raw::c_void,
cont: SEXP)
-> SEXP;
#[doc =
" Version of `R_UnwindProtect` that accepts `extern \"C-unwind\"` function pointers"]
#[link_name = "R_UnwindProtect"]
pub(crate) fn R_UnwindProtect_C_unwind(fun:
::std::option::Option<unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void)
-> SEXP>, fun_data: *mut ::std::os::raw::c_void,
cleanfun:
::std::option::Option<unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void,
Rboolean)>, cleanfun_data: *mut ::std::os::raw::c_void,
cont: SEXP)
-> SEXP;
#[doc = " External pointer interface"]
#[doc = "Unchecked FFI binding for `R_MakeExternalPtr`."]
#[doc = "Generated from source location line 367, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_MakeExternalPtr"]
pub(crate) fn R_MakeExternalPtr_unchecked(p: *mut ::std::os::raw::c_void,
tag: SEXP, prot: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `R_ExternalPtrAddr`."]
#[doc = "Generated from source location line 368, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_ExternalPtrAddr"]
pub fn R_ExternalPtrAddr_unchecked(s: SEXP)
-> *mut ::std::os::raw::c_void;
#[doc = "Unchecked FFI binding for `R_ExternalPtrTag`."]
#[doc = "Generated from source location line 369, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_ExternalPtrTag"]
pub(crate) fn R_ExternalPtrTag_unchecked(s: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `R_ExternalPtrProtected`."]
#[doc = "Generated from source location line 370, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_ExternalPtrProtected"]
pub(crate) fn R_ExternalPtrProtected_unchecked(s: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `R_ClearExternalPtr`."]
#[doc = "Generated from source location line 371, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_ClearExternalPtr"]
pub(crate) fn R_ClearExternalPtr_unchecked(s: SEXP);
#[doc = "Unchecked FFI binding for `R_SetExternalPtrAddr`."]
#[doc = "Generated from source location line 372, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_SetExternalPtrAddr"]
pub(crate) fn R_SetExternalPtrAddr_unchecked(s: SEXP,
p: *mut ::std::os::raw::c_void);
#[doc = "Unchecked FFI binding for `R_SetExternalPtrTag`."]
#[doc = "Generated from source location line 373, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_SetExternalPtrTag"]
pub(crate) fn R_SetExternalPtrTag_unchecked(s: SEXP, tag: SEXP);
#[doc = "Unchecked FFI binding for `R_SetExternalPtrProtected`."]
#[doc = "Generated from source location line 374, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_SetExternalPtrProtected"]
pub(crate) fn R_SetExternalPtrProtected_unchecked(s: SEXP, p: SEXP);
#[doc = " Added in R 3.4.0"]
#[doc = "Unchecked FFI binding for `R_MakeExternalPtrFn`."]
#[doc = "Generated from source location line 376, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_MakeExternalPtrFn"]
pub fn R_MakeExternalPtrFn_unchecked(p: DL_FUNC, tag: SEXP, prot: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `R_ExternalPtrAddrFn`."]
#[doc = "Generated from source location line 377, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_ExternalPtrAddrFn"]
pub fn R_ExternalPtrAddrFn_unchecked(s: SEXP)
-> DL_FUNC;
#[doc = "Unchecked FFI binding for `R_RegisterFinalizer`."]
#[doc = "Generated from source location line 378, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_RegisterFinalizer"]
pub fn R_RegisterFinalizer_unchecked(s: SEXP, fun: SEXP);
#[doc = "Unchecked FFI binding for `R_RegisterCFinalizer`."]
#[doc = "Generated from source location line 379, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_RegisterCFinalizer"]
pub(crate) fn R_RegisterCFinalizer_unchecked(s: SEXP,
fun: R_CFinalizer_t);
#[doc = "Unchecked FFI binding for `R_RegisterFinalizerEx`."]
#[doc = "Generated from source location line 380, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_RegisterFinalizerEx"]
pub fn R_RegisterFinalizerEx_unchecked(s: SEXP, fun: SEXP,
onexit: Rboolean);
#[doc = "Unchecked FFI binding for `R_RegisterCFinalizerEx`."]
#[doc = "Generated from source location line 381, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_RegisterCFinalizerEx"]
pub(crate) fn R_RegisterCFinalizerEx_unchecked(s: SEXP,
fun: R_CFinalizer_t, onexit: Rboolean);
#[doc = " Register a C-callable function for cross-package access."]
#[doc = "Unchecked FFI binding for `R_RegisterCCallable`."]
#[doc = "Generated from source location line 386, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_RegisterCCallable"]
pub(crate) fn R_RegisterCCallable_unchecked(package:
*const ::std::os::raw::c_char, name: *const ::std::os::raw::c_char,
fptr: DL_FUNC);
#[doc = " Get a C-callable function from another package."]
#[doc = "Unchecked FFI binding for `R_GetCCallable`."]
#[doc = "Generated from source location line 392, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_GetCCallable"]
pub(crate) fn R_GetCCallable_unchecked(package:
*const ::std::os::raw::c_char, name: *const ::std::os::raw::c_char)
-> DL_FUNC;
#[doc = " Add a SEXP to the protect stack, preventing GC collection."]
#[doc = ""]
#[doc =
" **Cost: O(1)** — single array write (`R_PPStack[top++] = s`). No allocation."]
#[doc = ""]
#[doc =
" Must be balanced by a corresponding `Rf_unprotect`. The protect stack is"]
#[doc =
" LIFO — nested scopes are safe, but interleaved usage from different scopes"]
#[doc = " will cause incorrect unprotection."]
#[doc(alias = "PROTECT")]
#[doc(alias = "protect")]
#[doc = "Unchecked FFI binding for `Rf_protect`."]
#[doc = "Generated from source location line 440, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_protect"]
pub fn Rf_protect_unchecked(s: SEXP)
-> SEXP;
#[doc = " Pop the top `l` entries from the protect stack."]
#[doc = ""]
#[doc =
" **Cost: O(1)** — single integer subtract (`R_PPStackTop -= l`). No allocation."]
#[doc = ""]
#[doc =
" The popped SEXPs become eligible for GC. Must match the number of"]
#[doc = " `Rf_protect` calls in the current scope (LIFO order)."]
#[doc(alias = "UNPROTECT")]
#[doc(alias = "unprotect")]
#[doc = "Unchecked FFI binding for `Rf_unprotect`."]
#[doc = "Generated from source location line 450, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_unprotect"]
pub fn Rf_unprotect_unchecked(l: ::std::os::raw::c_int);
#[doc = " Remove a specific SEXP from anywhere in the protect stack."]
#[doc = ""]
#[doc =
" **Cost: O(k)** — scans backwards from top (k = distance from top), then"]
#[doc =
" shifts remaining entries down. No allocation. R source comment:"]
#[doc = " *\"should be among the top few items\"*."]
#[doc = ""]
#[doc =
" Unlike `Rf_unprotect`, this is order-independent — it finds and removes"]
#[doc =
" the specific pointer regardless of stack position. Useful when LIFO"]
#[doc =
" discipline cannot be maintained, but more expensive than `Rf_unprotect`."]
#[doc(alias = "UNPROTECT_PTR")]
#[doc = "Unchecked FFI binding for `Rf_unprotect_ptr`."]
#[doc = "Generated from source location line 462, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_unprotect_ptr"]
pub fn Rf_unprotect_ptr_unchecked(s: SEXP);
#[doc =
" Add a SEXP to the global precious list, preventing GC indefinitely."]
#[doc = ""]
#[doc =
" **Cost: O(1) but allocates a CONSXP cell** — creates GC pressure on every"]
#[doc =
" call. The precious list is a global linked list (`R_PreciousList`)."]
#[doc = ""]
#[doc =
" Use only for long-lived objects (e.g., ExternalPtr stored across R calls)."]
#[doc =
" For temporary protection within a function, prefer `Rf_protect`."]
#[doc = "Unchecked FFI binding for `R_PreserveObject`."]
#[doc = "Generated from source location line 471, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_PreserveObject"]
pub fn R_PreserveObject_unchecked(object: SEXP);
#[doc = " Remove a SEXP from the global precious list, allowing GC."]
#[doc = ""]
#[doc =
" **Cost: O(n)** — linear scan of the entire precious list to find and unlink"]
#[doc =
" the cons cell. With `R_HASH_PRECIOUS` env var, O(bucket_size) average"]
#[doc = " via a 1069-bucket hash table, but this is off by default."]
#[doc = "Unchecked FFI binding for `R_ReleaseObject`."]
#[doc = "Generated from source location line 478, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_ReleaseObject"]
pub fn R_ReleaseObject_unchecked(object: SEXP);
#[doc(alias = "allocVector")]
#[doc = "Unchecked FFI binding for `Rf_allocVector`."]
#[doc = "Generated from source location line 483, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_allocVector"]
pub fn Rf_allocVector_unchecked(sexptype: SEXPTYPE, length: R_xlen_t)
-> SEXP;
#[doc(alias = "allocMatrix")]
#[doc = "Unchecked FFI binding for `Rf_allocMatrix`."]
#[doc = "Generated from source location line 485, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_allocMatrix"]
pub fn Rf_allocMatrix_unchecked(sexptype: SEXPTYPE,
nrow: ::std::os::raw::c_int, ncol: ::std::os::raw::c_int)
-> SEXP;
#[doc(alias = "allocArray")]
#[doc = "Unchecked FFI binding for `Rf_allocArray`."]
#[doc = "Generated from source location line 491, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_allocArray"]
pub fn Rf_allocArray_unchecked(sexptype: SEXPTYPE, dims: SEXP)
-> SEXP;
#[doc(alias = "alloc3DArray")]
#[doc = "Unchecked FFI binding for `Rf_alloc3DArray`."]
#[doc = "Generated from source location line 493, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_alloc3DArray"]
pub fn Rf_alloc3DArray_unchecked(sexptype: SEXPTYPE,
nrow: ::std::os::raw::c_int, ncol: ::std::os::raw::c_int,
nface: ::std::os::raw::c_int)
-> SEXP;
#[doc(alias = "allocList")]
#[doc = "Unchecked FFI binding for `Rf_allocList`."]
#[doc = "Generated from source location line 503, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_allocList"]
pub(crate) fn Rf_allocList_unchecked(n: ::std::os::raw::c_int)
-> SEXP;
#[doc = " Allocate a language object. Requires R >= 4.4.1; the portable"]
#[doc =
" [`crate::gc_protect::ProtectScope::alloc_lang`] also supports R 4.4.0."]
#[doc(alias = "allocLang")]
#[doc = "Unchecked FFI binding for `Rf_allocLang`."]
#[doc = "Generated from source location line 507, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_allocLang"]
pub fn Rf_allocLang_unchecked(n: ::std::os::raw::c_int)
-> SEXP;
#[doc(alias = "allocS4Object")]
#[doc = "Unchecked FFI binding for `Rf_allocS4Object`."]
#[doc = "Generated from source location line 509, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_allocS4Object"]
pub fn Rf_allocS4Object_unchecked()
-> SEXP;
#[doc = "Unchecked FFI binding for `Rf_cons`."]
#[doc = "Generated from source location line 512, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_cons"]
pub fn Rf_cons_unchecked(car: SEXP, cdr: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `Rf_lcons`."]
#[doc = "Generated from source location line 513, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_lcons"]
pub fn Rf_lcons_unchecked(car: SEXP, cdr: SEXP)
-> SEXP;
#[doc(alias = "setAttrib")]
#[doc = "Unchecked FFI binding for `Rf_setAttrib`."]
#[doc = "Generated from source location line 517, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_setAttrib"]
pub fn Rf_setAttrib_unchecked(vec: SEXP, name: SEXP, val: SEXP)
-> SEXP;
#[doc(alias = "ScalarComplex")]
#[doc = "Unchecked FFI binding for `Rf_ScalarComplex`."]
#[doc = "Generated from source location line 521, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_ScalarComplex"]
pub fn Rf_ScalarComplex_unchecked(x: Rcomplex)
-> SEXP;
#[doc(alias = "ScalarInteger")]
#[doc = "Unchecked FFI binding for `Rf_ScalarInteger`."]
#[doc = "Generated from source location line 523, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_ScalarInteger"]
pub fn Rf_ScalarInteger_unchecked(x: ::std::os::raw::c_int)
-> SEXP;
#[doc(alias = "ScalarLogical")]
#[doc = "Unchecked FFI binding for `Rf_ScalarLogical`."]
#[doc = "Generated from source location line 525, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_ScalarLogical"]
pub fn Rf_ScalarLogical_unchecked(x: ::std::os::raw::c_int)
-> SEXP;
#[doc(alias = "ScalarRaw")]
#[doc = "Unchecked FFI binding for `Rf_ScalarRaw`."]
#[doc = "Generated from source location line 527, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_ScalarRaw"]
pub fn Rf_ScalarRaw_unchecked(x: Rbyte)
-> SEXP;
#[doc(alias = "ScalarReal")]
#[doc = "Unchecked FFI binding for `Rf_ScalarReal`."]
#[doc = "Generated from source location line 529, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_ScalarReal"]
pub fn Rf_ScalarReal_unchecked(x: f64)
-> SEXP;
#[doc(alias = "ScalarString")]
#[doc = "Unchecked FFI binding for `Rf_ScalarString`."]
#[doc = "Generated from source location line 531, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_ScalarString"]
pub fn Rf_ScalarString_unchecked(x: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `DATAPTR_RO`."]
#[doc = "Generated from source location line 538, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "DATAPTR_RO"]
pub fn DATAPTR_RO_unchecked(x: SEXP)
-> *const ::std::os::raw::c_void;
#[doc = "Unchecked FFI binding for `DATAPTR_OR_NULL`."]
#[doc = "Generated from source location line 539, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "DATAPTR_OR_NULL"]
pub fn DATAPTR_OR_NULL_unchecked(x: SEXP)
-> *const ::std::os::raw::c_void;
#[doc = "Unchecked FFI binding for `CAR`."]
#[doc = "Generated from source location line 567, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "CAR"]
pub fn CAR_unchecked(e: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `CDR`."]
#[doc = "Generated from source location line 568, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "CDR"]
pub fn CDR_unchecked(e: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `CAAR`."]
#[doc = "Generated from source location line 569, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "CAAR"]
pub fn CAAR_unchecked(e: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `CDAR`."]
#[doc = "Generated from source location line 570, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "CDAR"]
pub fn CDAR_unchecked(e: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `CADR`."]
#[doc = "Generated from source location line 571, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "CADR"]
pub fn CADR_unchecked(e: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `CDDR`."]
#[doc = "Generated from source location line 572, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "CDDR"]
pub fn CDDR_unchecked(e: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `CADDR`."]
#[doc = "Generated from source location line 573, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "CADDR"]
pub fn CADDR_unchecked(e: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `CADDDR`."]
#[doc = "Generated from source location line 574, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "CADDDR"]
pub fn CADDDR_unchecked(e: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `CAD4R`."]
#[doc = "Generated from source location line 575, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "CAD4R"]
pub fn CAD4R_unchecked(e: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `TAG`."]
#[doc = "Generated from source location line 576, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "TAG"]
pub fn TAG_unchecked(e: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `SET_TAG`."]
#[doc = "Generated from source location line 577, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "SET_TAG"]
pub fn SET_TAG_unchecked(x: SEXP, y: SEXP);
#[doc = "Unchecked FFI binding for `SETCAR`."]
#[doc = "Generated from source location line 578, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "SETCAR"]
pub fn SETCAR_unchecked(x: SEXP, y: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `SETCDR`."]
#[doc = "Generated from source location line 579, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "SETCDR"]
pub fn SETCDR_unchecked(x: SEXP, y: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `SETCADR`."]
#[doc = "Generated from source location line 580, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "SETCADR"]
pub fn SETCADR_unchecked(x: SEXP, y: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `SETCADDR`."]
#[doc = "Generated from source location line 581, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "SETCADDR"]
pub fn SETCADDR_unchecked(x: SEXP, y: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `SETCADDDR`."]
#[doc = "Generated from source location line 582, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "SETCADDDR"]
pub fn SETCADDDR_unchecked(x: SEXP, y: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `SETCAD4R`."]
#[doc = "Generated from source location line 583, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "SETCAD4R"]
pub fn SETCAD4R_unchecked(e: SEXP, y: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `LOGICAL_OR_NULL`."]
#[doc = "Generated from source location line 584, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "LOGICAL_OR_NULL"]
pub fn LOGICAL_OR_NULL_unchecked(x: SEXP)
-> *const ::std::os::raw::c_int;
#[doc = "Unchecked FFI binding for `INTEGER_OR_NULL`."]
#[doc = "Generated from source location line 585, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "INTEGER_OR_NULL"]
pub fn INTEGER_OR_NULL_unchecked(x: SEXP)
-> *const ::std::os::raw::c_int;
#[doc = "Unchecked FFI binding for `REAL_OR_NULL`."]
#[doc = "Generated from source location line 586, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "REAL_OR_NULL"]
pub fn REAL_OR_NULL_unchecked(x: SEXP)
-> *const f64;
#[doc = "Unchecked FFI binding for `COMPLEX_OR_NULL`."]
#[doc = "Generated from source location line 587, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "COMPLEX_OR_NULL"]
pub fn COMPLEX_OR_NULL_unchecked(x: SEXP)
-> *const Rcomplex;
#[doc = "Unchecked FFI binding for `RAW_OR_NULL`."]
#[doc = "Generated from source location line 588, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "RAW_OR_NULL"]
pub fn RAW_OR_NULL_unchecked(x: SEXP)
-> *const Rbyte;
#[doc = "Unchecked FFI binding for `INTEGER_ELT`."]
#[doc = "Generated from source location line 591, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "INTEGER_ELT"]
pub fn INTEGER_ELT_unchecked(x: SEXP, i: R_xlen_t)
-> ::std::os::raw::c_int;
#[doc = "Unchecked FFI binding for `REAL_ELT`."]
#[doc = "Generated from source location line 592, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "REAL_ELT"]
pub fn REAL_ELT_unchecked(x: SEXP, i: R_xlen_t)
-> f64;
#[doc = "Unchecked FFI binding for `LOGICAL_ELT`."]
#[doc = "Generated from source location line 593, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "LOGICAL_ELT"]
pub fn LOGICAL_ELT_unchecked(x: SEXP, i: R_xlen_t)
-> ::std::os::raw::c_int;
#[doc = "Unchecked FFI binding for `COMPLEX_ELT`."]
#[doc = "Generated from source location line 594, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "COMPLEX_ELT"]
pub fn COMPLEX_ELT_unchecked(x: SEXP, i: R_xlen_t)
-> Rcomplex;
#[doc = "Unchecked FFI binding for `RAW_ELT`."]
#[doc = "Generated from source location line 595, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "RAW_ELT"]
pub fn RAW_ELT_unchecked(x: SEXP, i: R_xlen_t)
-> Rbyte;
#[doc = "Unchecked FFI binding for `VECTOR_ELT`."]
#[doc = "Generated from source location line 596, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "VECTOR_ELT"]
pub fn VECTOR_ELT_unchecked(x: SEXP, i: R_xlen_t)
-> SEXP;
#[doc = "Unchecked FFI binding for `STRING_ELT`."]
#[doc = "Generated from source location line 597, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "STRING_ELT"]
pub fn STRING_ELT_unchecked(x: SEXP, i: R_xlen_t)
-> SEXP;
#[doc = "Unchecked FFI binding for `SET_STRING_ELT`."]
#[doc = "Generated from source location line 598, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "SET_STRING_ELT"]
pub fn SET_STRING_ELT_unchecked(x: SEXP, i: R_xlen_t, v: SEXP);
#[doc = "Unchecked FFI binding for `SET_LOGICAL_ELT`."]
#[doc = "Generated from source location line 599, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "SET_LOGICAL_ELT"]
pub fn SET_LOGICAL_ELT_unchecked(x: SEXP, i: R_xlen_t,
v: ::std::os::raw::c_int);
#[doc = "Unchecked FFI binding for `SET_INTEGER_ELT`."]
#[doc = "Generated from source location line 600, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "SET_INTEGER_ELT"]
pub fn SET_INTEGER_ELT_unchecked(x: SEXP, i: R_xlen_t,
v: ::std::os::raw::c_int);
#[doc = "Unchecked FFI binding for `SET_REAL_ELT`."]
#[doc = "Generated from source location line 601, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "SET_REAL_ELT"]
pub fn SET_REAL_ELT_unchecked(x: SEXP, i: R_xlen_t, v: f64);
#[doc = "Unchecked FFI binding for `SET_COMPLEX_ELT`."]
#[doc = "Generated from source location line 602, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "SET_COMPLEX_ELT"]
pub fn SET_COMPLEX_ELT_unchecked(x: SEXP, i: R_xlen_t, v: Rcomplex);
#[doc = "Unchecked FFI binding for `SET_RAW_ELT`."]
#[doc = "Generated from source location line 603, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "SET_RAW_ELT"]
pub fn SET_RAW_ELT_unchecked(x: SEXP, i: R_xlen_t, v: Rbyte);
#[doc = "Unchecked FFI binding for `SET_VECTOR_ELT`."]
#[doc = "Generated from source location line 604, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "SET_VECTOR_ELT"]
pub fn SET_VECTOR_ELT_unchecked(x: SEXP, i: R_xlen_t, v: SEXP)
-> SEXP;
#[doc = " Get the length of a SEXP as `int` (for short vectors < 2^31)."]
#[doc = ""]
#[doc = " For long vectors, use `Rf_xlength()` instead."]
#[doc = " Returns 0 for R_NilValue."]
#[doc = "Unchecked FFI binding for `LENGTH`."]
#[doc = "Generated from source location line 614, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "LENGTH"]
pub fn LENGTH_unchecked(x: SEXP)
-> ::std::os::raw::c_int;
#[doc =
" Get the length of a SEXP as `R_xlen_t` (supports long vectors)."]
#[doc = ""]
#[doc = " ALTREP-aware: will call ALTREP Length method if needed."]
#[doc = "Unchecked FFI binding for `XLENGTH`."]
#[doc = "Generated from source location line 619, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "XLENGTH"]
pub fn XLENGTH_unchecked(x: SEXP)
-> R_xlen_t;
#[doc =
" Non-zero if `x` has any attributes (`ATTRIB(x) != R_NilValue`)."]
#[doc = ""]
#[doc =
" The API replacement for testing `ATTRIB`. R 4.5.0 added it: R 4.4\'s"]
#[doc =
" libR does not export it, so a package that references it fails to"]
#[doc =
" load there, and it is declared only when building against R >= 4.5"]
#[doc =
" (`r_4_5`, #1905). `SexpExt::has_attributes` works on R 4.4 as well."]
#[doc = " Unlike `attributes()`, it ignores the tag names of a pairlist."]
#[doc(alias = "NO_ATTRIB")]
#[doc = "Unchecked FFI binding for `ANY_ATTRIB`."]
#[doc = "Generated from source location line 630, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "ANY_ATTRIB"]
pub fn ANY_ATTRIB_unchecked(x: SEXP)
-> ::std::os::raw::c_int;
#[doc = "Unchecked FFI binding for `ALTREP_CLASS`."]
#[doc = "Generated from source location line 688, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "ALTREP_CLASS"]
pub(crate) fn ALTREP_CLASS_unchecked(x: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `R_altrep_data1`."]
#[doc = "Generated from source location line 689, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_altrep_data1"]
pub fn R_altrep_data1_unchecked(x: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `R_altrep_data2`."]
#[doc = "Generated from source location line 690, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_altrep_data2"]
pub fn R_altrep_data2_unchecked(x: SEXP)
-> SEXP;
#[doc = "Unchecked FFI binding for `R_set_altrep_data1`."]
#[doc = "Generated from source location line 691, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_set_altrep_data1"]
pub fn R_set_altrep_data1_unchecked(x: SEXP, v: SEXP);
#[doc = "Unchecked FFI binding for `R_set_altrep_data2`."]
#[doc = "Generated from source location line 692, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_set_altrep_data2"]
pub fn R_set_altrep_data2_unchecked(x: SEXP, v: SEXP);
#[doc =
" Check if a SEXP is an ALTREP object (returns non-zero if true)."]
#[doc = ""]
#[doc = " Use `SexpExt::is_altrep()` instead of calling this directly."]
#[doc = "Unchecked FFI binding for `ALTREP`."]
#[doc = "Generated from source location line 697, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "ALTREP"]
pub fn ALTREP_unchecked(x: SEXP)
-> ::std::os::raw::c_int;
#[doc = " Get mutable pointer to logical vector data."]
#[doc = ""]
#[doc = " For ALTREP vectors, this may force materialization."]
#[doc = " Get mutable pointer to logical vector data."]
#[doc = ""]
#[doc = " For ALTREP vectors, this may force materialization."]
#[doc =
" Prefer `SexpExt::set_logical_elt()` / `SexpExt::logical_elt()`."]
#[doc = "Unchecked FFI binding for `LOGICAL`."]
#[doc = "Generated from source location line 712, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "LOGICAL"]
pub(crate) fn LOGICAL_unchecked(x: SEXP)
-> *mut ::std::os::raw::c_int;
#[doc = " Get mutable pointer to integer vector data."]
#[doc = ""]
#[doc = " For ALTREP vectors, this may force materialization."]
#[doc =
" Prefer `SexpExt::set_integer_elt()` / `SexpExt::integer_elt()`."]
#[doc = "Unchecked FFI binding for `INTEGER`."]
#[doc = "Generated from source location line 718, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "INTEGER"]
pub(crate) fn INTEGER_unchecked(x: SEXP)
-> *mut ::std::os::raw::c_int;
#[doc = " Get mutable pointer to real vector data."]
#[doc = ""]
#[doc = " For ALTREP vectors, this may force materialization."]
#[doc = " Prefer `SexpExt::set_real_elt()` / `SexpExt::real_elt()`."]
#[doc = "Unchecked FFI binding for `REAL`."]
#[doc = "Generated from source location line 724, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "REAL"]
pub(crate) fn REAL_unchecked(x: SEXP)
-> *mut f64;
#[doc = " Get mutable pointer to complex vector data."]
#[doc = ""]
#[doc = " For ALTREP vectors, this may force materialization."]
#[doc =
" Prefer `SexpExt::set_complex_elt()` / `SexpExt::complex_elt()`."]
#[doc = "Unchecked FFI binding for `COMPLEX`."]
#[doc = "Generated from source location line 730, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "COMPLEX"]
pub(crate) fn COMPLEX_unchecked(x: SEXP)
-> *mut Rcomplex;
#[doc = " Get mutable pointer to raw vector data."]
#[doc = ""]
#[doc = " For ALTREP vectors, this may force materialization."]
#[doc = " Prefer `SexpExt::set_raw_elt()` / `SexpExt::raw_elt()`."]
#[doc = "Unchecked FFI binding for `RAW`."]
#[doc = "Generated from source location line 736, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "RAW"]
pub(crate) fn RAW_unchecked(x: SEXP)
-> *mut Rbyte;
#[doc = "Unchecked FFI binding for `R_CheckUserInterrupt`."]
#[doc = "Generated from source location line 743, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_CheckUserInterrupt"]
pub fn R_CheckUserInterrupt_unchecked();
#[doc = "Unchecked FFI binding for `TYPEOF`."]
#[doc = "Generated from source location line 749, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "TYPEOF"]
pub fn TYPEOF_unchecked(x: SEXP)
-> SEXPTYPE;
#[doc(alias = "install")]
#[doc = "Unchecked FFI binding for `Rf_install`."]
#[doc = "Generated from source location line 755, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_install"]
pub fn Rf_install_unchecked(name: *const ::std::os::raw::c_char)
-> SEXP;
#[doc = " Get the print name (CHARSXP) of a symbol (SYMSXP)"]
#[doc = "Unchecked FFI binding for `PRINTNAME`."]
#[doc = "Generated from source location line 757, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "PRINTNAME"]
pub fn PRINTNAME_unchecked(x: SEXP)
-> SEXP;
#[doc =
" Get the C string pointer from a CHARSXP — encapsulated by SexpExt::r_char()"]
#[doc(alias = "CHAR")]
#[doc = "Unchecked FFI binding for `R_CHAR`."]
#[doc = "Generated from source location line 760, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_CHAR"]
pub fn R_CHAR_unchecked(x: SEXP)
-> *const ::std::os::raw::c_char;
#[doc =
" Read an attribute from an object by symbol (e.g. `R_NamesSymbol`)."]
#[doc = ""]
#[doc = " Returns `R_NilValue` if the attribute is not set."]
#[doc(alias = "getAttrib")]
#[doc = "Unchecked FFI binding for `Rf_getAttrib`."]
#[doc = "Generated from source location line 768, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_getAttrib"]
pub fn Rf_getAttrib_unchecked(vec: SEXP, name: SEXP)
-> SEXP;
#[doc = " Set the `names` attribute; returns the updated object."]
#[doc(alias = "namesgets")]
#[doc = "Unchecked FFI binding for `Rf_namesgets`."]
#[doc = "Generated from source location line 771, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_namesgets"]
pub fn Rf_namesgets_unchecked(vec: SEXP, val: SEXP)
-> SEXP;
#[doc = " Set the `dim` attribute; returns the updated object."]
#[doc(alias = "dimgets")]
#[doc = "Unchecked FFI binding for `Rf_dimgets`."]
#[doc = "Generated from source location line 774, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_dimgets"]
pub fn Rf_dimgets_unchecked(vec: SEXP, val: SEXP)
-> SEXP;
#[doc(alias = "duplicate")]
#[doc = "Unchecked FFI binding for `Rf_duplicate`."]
#[doc = "Generated from source location line 778, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_duplicate"]
pub fn Rf_duplicate_unchecked(s: SEXP)
-> SEXP;
#[doc(alias = "shallow_duplicate")]
#[doc = "Unchecked FFI binding for `Rf_shallow_duplicate`."]
#[doc = "Generated from source location line 780, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_shallow_duplicate"]
pub fn Rf_shallow_duplicate_unchecked(s: SEXP)
-> SEXP;
#[doc = " Check if two R objects are identical (deep semantic equality)."]
#[doc = ""]
#[doc = " This is the C implementation of R\'s `identical()` function."]
#[doc = ""]
#[doc = " # Flags"]
#[doc = ""]
#[doc =
" Use the `IDENT_*` constants below. Flags are inverted: set bit = disable that check."]
#[doc = ""]
#[doc =
" **Default from R**: `IDENT_USE_CLOENV` (16) - ignore closure environments"]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc = " `TRUE` if identical, `FALSE` otherwise."]
#[doc = ""]
#[doc = " # Performance"]
#[doc = ""]
#[doc = " Fast-path: Returns `TRUE` immediately if pointers are equal."]
#[doc = "Unchecked FFI binding for `R_compute_identical`."]
#[doc = "Generated from source location line 800, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_compute_identical"]
pub fn R_compute_identical_unchecked(x: SEXP, y: SEXP,
flags: ::std::os::raw::c_int)
-> Rboolean;
}
#[doc =
"Checked wrapper for `R_FlushConsole`. Calls `R_FlushConsole_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 296, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_FlushConsole() {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_FlushConsole_unchecked()
})
});
result.0
}
#[doc(alias = "mkChar")]
#[doc =
"Checked wrapper for `Rf_mkChar`. Calls `Rf_mkChar_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 312, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_mkChar(s: *const ::std::os::raw::c_char) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_mkChar_unchecked(s)
})
});
result.0
}
#[doc(alias = "mkCharLen")]
#[doc =
"Checked wrapper for `Rf_mkCharLen`. Calls `Rf_mkCharLen_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 314, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_mkCharLen(s: *const ::std::os::raw::c_char, len: i32)
-> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_mkCharLen_unchecked(s, len)
})
});
result.0
}
#[doc(alias = "mkCharLenCE")]
#[doc =
"Checked wrapper for `Rf_mkCharLenCE`. Calls `Rf_mkCharLenCE_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 316, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_mkCharLenCE(x: *const ::std::os::raw::c_char,
len: ::std::os::raw::c_int, ce: cetype_t) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_mkCharLenCE_unchecked(x, len, ce)
})
});
result.0
}
#[doc(alias = "xlength")]
#[doc(alias = "XLENGTH")]
#[doc =
"Checked wrapper for `Rf_xlength`. Calls `Rf_xlength_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 323, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_xlength(x: SEXP) -> R_xlen_t {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_xlength_unchecked(x)
})
});
result.0
}
#[doc(alias = "translateCharUTF8")]
#[doc =
"Checked wrapper for `Rf_translateCharUTF8`. Calls `Rf_translateCharUTF8_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 325, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_translateCharUTF8(x: SEXP) -> *const ::std::os::raw::c_char {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_translateCharUTF8_unchecked(x)
})
});
result.0
}
#[doc(alias = "getCharCE")]
#[doc =
"Checked wrapper for `Rf_getCharCE`. Calls `Rf_getCharCE_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 327, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_getCharCE(x: SEXP) -> cetype_t {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_getCharCE_unchecked(x)
})
});
result.0
}
#[doc(alias = "charIsASCII")]
#[doc =
"Checked wrapper for `Rf_charIsASCII`. Calls `Rf_charIsASCII_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 329, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_charIsASCII(x: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_charIsASCII_unchecked(x)
})
});
result.0
}
#[doc(alias = "charIsUTF8")]
#[doc =
"Checked wrapper for `Rf_charIsUTF8`. Calls `Rf_charIsUTF8_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 331, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_charIsUTF8(x: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_charIsUTF8_unchecked(x)
})
});
result.0
}
#[doc(alias = "charIsLatin1")]
#[doc =
"Checked wrapper for `Rf_charIsLatin1`. Calls `Rf_charIsLatin1_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 333, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_charIsLatin1(x: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_charIsLatin1_unchecked(x)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_MakeUnwindCont`. Calls `R_MakeUnwindCont_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 336, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_MakeUnwindCont() -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_MakeUnwindCont_unchecked()
})
});
result.0
}
#[doc =
"Checked wrapper for `R_ContinueUnwind`. Calls `R_ContinueUnwind_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 337, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_ContinueUnwind(cont: SEXP) -> ! {
::miniextendr_api::worker::with_r_thread(move ||
unsafe { R_ContinueUnwind_unchecked(cont) })
}
#[doc =
"Checked wrapper for `R_UnwindProtect`. Calls `R_UnwindProtect_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 338, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_UnwindProtect(fun:
::std::option::Option<unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void)
-> SEXP>, fun_data: *mut ::std::os::raw::c_void,
cleanfun:
::std::option::Option<unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void,
Rboolean)>, cleanfun_data: *mut ::std::os::raw::c_void,
cont: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_UnwindProtect_unchecked(fun, fun_data, cleanfun,
cleanfun_data, cont)
})
});
result.0
}
#[doc = " External pointer interface"]
#[doc =
"Checked wrapper for `R_MakeExternalPtr`. Calls `R_MakeExternalPtr_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 367, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_MakeExternalPtr(p: *mut ::std::os::raw::c_void,
tag: SEXP, prot: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_MakeExternalPtr_unchecked(p, tag, prot)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_ExternalPtrAddr`. Calls `R_ExternalPtrAddr_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 368, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_ExternalPtrAddr(s: SEXP) -> *mut ::std::os::raw::c_void {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_ExternalPtrAddr_unchecked(s)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_ExternalPtrTag`. Calls `R_ExternalPtrTag_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 369, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_ExternalPtrTag(s: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_ExternalPtrTag_unchecked(s)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_ExternalPtrProtected`. Calls `R_ExternalPtrProtected_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 370, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_ExternalPtrProtected(s: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_ExternalPtrProtected_unchecked(s)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_ClearExternalPtr`. Calls `R_ClearExternalPtr_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 371, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_ClearExternalPtr(s: SEXP) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_ClearExternalPtr_unchecked(s)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_SetExternalPtrAddr`. Calls `R_SetExternalPtrAddr_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 372, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_SetExternalPtrAddr(s: SEXP,
p: *mut ::std::os::raw::c_void) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_SetExternalPtrAddr_unchecked(s, p)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_SetExternalPtrTag`. Calls `R_SetExternalPtrTag_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 373, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_SetExternalPtrTag(s: SEXP, tag: SEXP) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_SetExternalPtrTag_unchecked(s, tag)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_SetExternalPtrProtected`. Calls `R_SetExternalPtrProtected_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 374, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_SetExternalPtrProtected(s: SEXP, p: SEXP) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_SetExternalPtrProtected_unchecked(s, p)
})
});
result.0
}
#[doc = " Added in R 3.4.0"]
#[doc =
"Checked wrapper for `R_MakeExternalPtrFn`. Calls `R_MakeExternalPtrFn_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 376, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_MakeExternalPtrFn(p: DL_FUNC, tag: SEXP, prot: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_MakeExternalPtrFn_unchecked(p, tag, prot)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_ExternalPtrAddrFn`. Calls `R_ExternalPtrAddrFn_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 377, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_ExternalPtrAddrFn(s: SEXP) -> DL_FUNC {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_ExternalPtrAddrFn_unchecked(s)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_RegisterFinalizer`. Calls `R_RegisterFinalizer_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 378, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_RegisterFinalizer(s: SEXP, fun: SEXP) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_RegisterFinalizer_unchecked(s, fun)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_RegisterCFinalizer`. Calls `R_RegisterCFinalizer_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 379, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_RegisterCFinalizer(s: SEXP, fun: R_CFinalizer_t) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_RegisterCFinalizer_unchecked(s, fun)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_RegisterFinalizerEx`. Calls `R_RegisterFinalizerEx_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 380, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_RegisterFinalizerEx(s: SEXP, fun: SEXP, onexit: Rboolean) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_RegisterFinalizerEx_unchecked(s, fun, onexit)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_RegisterCFinalizerEx`. Calls `R_RegisterCFinalizerEx_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 381, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_RegisterCFinalizerEx(s: SEXP, fun: R_CFinalizer_t,
onexit: Rboolean) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_RegisterCFinalizerEx_unchecked(s, fun, onexit)
})
});
result.0
}
#[doc = " Register a C-callable function for cross-package access."]
#[doc =
"Checked wrapper for `R_RegisterCCallable`. Calls `R_RegisterCCallable_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 386, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_RegisterCCallable(package:
*const ::std::os::raw::c_char, name: *const ::std::os::raw::c_char,
fptr: DL_FUNC) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_RegisterCCallable_unchecked(package, name, fptr)
})
});
result.0
}
#[doc = " Get a C-callable function from another package."]
#[doc =
"Checked wrapper for `R_GetCCallable`. Calls `R_GetCCallable_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 392, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_GetCCallable(package: *const ::std::os::raw::c_char,
name: *const ::std::os::raw::c_char) -> DL_FUNC {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_GetCCallable_unchecked(package, name)
})
});
result.0
}
#[doc = " Add a SEXP to the protect stack, preventing GC collection."]
#[doc = ""]
#[doc =
" **Cost: O(1)** — single array write (`R_PPStack[top++] = s`). No allocation."]
#[doc = ""]
#[doc =
" Must be balanced by a corresponding `Rf_unprotect`. The protect stack is"]
#[doc =
" LIFO — nested scopes are safe, but interleaved usage from different scopes"]
#[doc = " will cause incorrect unprotection."]
#[doc(alias = "PROTECT")]
#[doc(alias = "protect")]
#[doc =
"Checked wrapper for `Rf_protect`. Calls `Rf_protect_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 440, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_protect(s: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_protect_unchecked(s)
})
});
result.0
}
#[doc = " Pop the top `l` entries from the protect stack."]
#[doc = ""]
#[doc =
" **Cost: O(1)** — single integer subtract (`R_PPStackTop -= l`). No allocation."]
#[doc = ""]
#[doc = " The popped SEXPs become eligible for GC. Must match the number of"]
#[doc = " `Rf_protect` calls in the current scope (LIFO order)."]
#[doc(alias = "UNPROTECT")]
#[doc(alias = "unprotect")]
#[doc =
"Checked wrapper for `Rf_unprotect`. Calls `Rf_unprotect_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 450, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_unprotect(l: ::std::os::raw::c_int) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_unprotect_unchecked(l)
})
});
result.0
}
#[doc = " Remove a specific SEXP from anywhere in the protect stack."]
#[doc = ""]
#[doc =
" **Cost: O(k)** — scans backwards from top (k = distance from top), then"]
#[doc = " shifts remaining entries down. No allocation. R source comment:"]
#[doc = " *\"should be among the top few items\"*."]
#[doc = ""]
#[doc =
" Unlike `Rf_unprotect`, this is order-independent — it finds and removes"]
#[doc =
" the specific pointer regardless of stack position. Useful when LIFO"]
#[doc =
" discipline cannot be maintained, but more expensive than `Rf_unprotect`."]
#[doc(alias = "UNPROTECT_PTR")]
#[doc =
"Checked wrapper for `Rf_unprotect_ptr`. Calls `Rf_unprotect_ptr_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 462, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_unprotect_ptr(s: SEXP) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_unprotect_ptr_unchecked(s)
})
});
result.0
}
#[doc =
" Add a SEXP to the global precious list, preventing GC indefinitely."]
#[doc = ""]
#[doc =
" **Cost: O(1) but allocates a CONSXP cell** — creates GC pressure on every"]
#[doc =
" call. The precious list is a global linked list (`R_PreciousList`)."]
#[doc = ""]
#[doc =
" Use only for long-lived objects (e.g., ExternalPtr stored across R calls)."]
#[doc = " For temporary protection within a function, prefer `Rf_protect`."]
#[doc =
"Checked wrapper for `R_PreserveObject`. Calls `R_PreserveObject_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 471, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_PreserveObject(object: SEXP) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_PreserveObject_unchecked(object)
})
});
result.0
}
#[doc = " Remove a SEXP from the global precious list, allowing GC."]
#[doc = ""]
#[doc =
" **Cost: O(n)** — linear scan of the entire precious list to find and unlink"]
#[doc =
" the cons cell. With `R_HASH_PRECIOUS` env var, O(bucket_size) average"]
#[doc = " via a 1069-bucket hash table, but this is off by default."]
#[doc =
"Checked wrapper for `R_ReleaseObject`. Calls `R_ReleaseObject_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 478, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_ReleaseObject(object: SEXP) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_ReleaseObject_unchecked(object)
})
});
result.0
}
#[doc(alias = "allocVector")]
#[doc =
"Checked wrapper for `Rf_allocVector`. Calls `Rf_allocVector_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 483, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_allocVector(sexptype: SEXPTYPE, length: R_xlen_t) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_allocVector_unchecked(sexptype, length)
})
});
result.0
}
#[doc(alias = "allocMatrix")]
#[doc =
"Checked wrapper for `Rf_allocMatrix`. Calls `Rf_allocMatrix_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 485, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_allocMatrix(sexptype: SEXPTYPE, nrow: ::std::os::raw::c_int,
ncol: ::std::os::raw::c_int) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_allocMatrix_unchecked(sexptype, nrow, ncol)
})
});
result.0
}
#[doc(alias = "allocArray")]
#[doc =
"Checked wrapper for `Rf_allocArray`. Calls `Rf_allocArray_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 491, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_allocArray(sexptype: SEXPTYPE, dims: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_allocArray_unchecked(sexptype, dims)
})
});
result.0
}
#[doc(alias = "alloc3DArray")]
#[doc =
"Checked wrapper for `Rf_alloc3DArray`. Calls `Rf_alloc3DArray_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 493, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_alloc3DArray(sexptype: SEXPTYPE, nrow: ::std::os::raw::c_int,
ncol: ::std::os::raw::c_int, nface: ::std::os::raw::c_int) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_alloc3DArray_unchecked(sexptype, nrow, ncol, nface)
})
});
result.0
}
#[doc(alias = "allocList")]
#[doc =
"Checked wrapper for `Rf_allocList`. Calls `Rf_allocList_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 503, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn Rf_allocList(n: ::std::os::raw::c_int) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_allocList_unchecked(n)
})
});
result.0
}
#[doc = " Allocate a language object. Requires R >= 4.4.1; the portable"]
#[doc =
" [`crate::gc_protect::ProtectScope::alloc_lang`] also supports R 4.4.0."]
#[doc(alias = "allocLang")]
#[doc =
"Checked wrapper for `Rf_allocLang`. Calls `Rf_allocLang_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 507, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_allocLang(n: ::std::os::raw::c_int) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_allocLang_unchecked(n)
})
});
result.0
}
#[doc(alias = "allocS4Object")]
#[doc =
"Checked wrapper for `Rf_allocS4Object`. Calls `Rf_allocS4Object_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 509, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_allocS4Object() -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_allocS4Object_unchecked()
})
});
result.0
}
#[doc =
"Checked wrapper for `Rf_cons`. Calls `Rf_cons_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 512, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_cons(car: SEXP, cdr: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_cons_unchecked(car, cdr)
})
});
result.0
}
#[doc =
"Checked wrapper for `Rf_lcons`. Calls `Rf_lcons_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 513, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_lcons(car: SEXP, cdr: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_lcons_unchecked(car, cdr)
})
});
result.0
}
#[doc(alias = "setAttrib")]
#[doc =
"Checked wrapper for `Rf_setAttrib`. Calls `Rf_setAttrib_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 517, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_setAttrib(vec: SEXP, name: SEXP, val: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_setAttrib_unchecked(vec, name, val)
})
});
result.0
}
#[doc(alias = "ScalarComplex")]
#[doc =
"Checked wrapper for `Rf_ScalarComplex`. Calls `Rf_ScalarComplex_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 521, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_ScalarComplex(x: Rcomplex) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_ScalarComplex_unchecked(x)
})
});
result.0
}
#[doc(alias = "ScalarInteger")]
#[doc =
"Checked wrapper for `Rf_ScalarInteger`. Calls `Rf_ScalarInteger_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 523, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_ScalarInteger(x: ::std::os::raw::c_int) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_ScalarInteger_unchecked(x)
})
});
result.0
}
#[doc(alias = "ScalarLogical")]
#[doc =
"Checked wrapper for `Rf_ScalarLogical`. Calls `Rf_ScalarLogical_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 525, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_ScalarLogical(x: ::std::os::raw::c_int) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_ScalarLogical_unchecked(x)
})
});
result.0
}
#[doc(alias = "ScalarRaw")]
#[doc =
"Checked wrapper for `Rf_ScalarRaw`. Calls `Rf_ScalarRaw_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 527, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_ScalarRaw(x: Rbyte) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_ScalarRaw_unchecked(x)
})
});
result.0
}
#[doc(alias = "ScalarReal")]
#[doc =
"Checked wrapper for `Rf_ScalarReal`. Calls `Rf_ScalarReal_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 529, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_ScalarReal(x: f64) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_ScalarReal_unchecked(x)
})
});
result.0
}
#[doc(alias = "ScalarString")]
#[doc =
"Checked wrapper for `Rf_ScalarString`. Calls `Rf_ScalarString_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 531, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_ScalarString(x: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_ScalarString_unchecked(x)
})
});
result.0
}
#[doc =
"Checked wrapper for `DATAPTR_RO`. Calls `DATAPTR_RO_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 538, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn DATAPTR_RO(x: SEXP) -> *const ::std::os::raw::c_void {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
DATAPTR_RO_unchecked(x)
})
});
result.0
}
#[doc =
"Checked wrapper for `DATAPTR_OR_NULL`. Calls `DATAPTR_OR_NULL_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 539, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn DATAPTR_OR_NULL(x: SEXP) -> *const ::std::os::raw::c_void {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
DATAPTR_OR_NULL_unchecked(x)
})
});
result.0
}
#[doc =
"Checked wrapper for `CAR`. Calls `CAR_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 567, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn CAR(e: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
CAR_unchecked(e)
})
});
result.0
}
#[doc =
"Checked wrapper for `CDR`. Calls `CDR_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 568, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn CDR(e: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
CDR_unchecked(e)
})
});
result.0
}
#[doc =
"Checked wrapper for `CAAR`. Calls `CAAR_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 569, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn CAAR(e: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
CAAR_unchecked(e)
})
});
result.0
}
#[doc =
"Checked wrapper for `CDAR`. Calls `CDAR_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 570, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn CDAR(e: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
CDAR_unchecked(e)
})
});
result.0
}
#[doc =
"Checked wrapper for `CADR`. Calls `CADR_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 571, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn CADR(e: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
CADR_unchecked(e)
})
});
result.0
}
#[doc =
"Checked wrapper for `CDDR`. Calls `CDDR_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 572, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn CDDR(e: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
CDDR_unchecked(e)
})
});
result.0
}
#[doc =
"Checked wrapper for `CADDR`. Calls `CADDR_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 573, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn CADDR(e: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
CADDR_unchecked(e)
})
});
result.0
}
#[doc =
"Checked wrapper for `CADDDR`. Calls `CADDDR_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 574, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn CADDDR(e: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
CADDDR_unchecked(e)
})
});
result.0
}
#[doc =
"Checked wrapper for `CAD4R`. Calls `CAD4R_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 575, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn CAD4R(e: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
CAD4R_unchecked(e)
})
});
result.0
}
#[doc =
"Checked wrapper for `TAG`. Calls `TAG_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 576, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn TAG(e: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
TAG_unchecked(e)
})
});
result.0
}
#[doc =
"Checked wrapper for `SET_TAG`. Calls `SET_TAG_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 577, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn SET_TAG(x: SEXP, y: SEXP) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
SET_TAG_unchecked(x, y)
})
});
result.0
}
#[doc =
"Checked wrapper for `SETCAR`. Calls `SETCAR_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 578, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn SETCAR(x: SEXP, y: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
SETCAR_unchecked(x, y)
})
});
result.0
}
#[doc =
"Checked wrapper for `SETCDR`. Calls `SETCDR_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 579, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn SETCDR(x: SEXP, y: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
SETCDR_unchecked(x, y)
})
});
result.0
}
#[doc =
"Checked wrapper for `SETCADR`. Calls `SETCADR_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 580, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn SETCADR(x: SEXP, y: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
SETCADR_unchecked(x, y)
})
});
result.0
}
#[doc =
"Checked wrapper for `SETCADDR`. Calls `SETCADDR_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 581, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn SETCADDR(x: SEXP, y: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
SETCADDR_unchecked(x, y)
})
});
result.0
}
#[doc =
"Checked wrapper for `SETCADDDR`. Calls `SETCADDDR_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 582, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn SETCADDDR(x: SEXP, y: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
SETCADDDR_unchecked(x, y)
})
});
result.0
}
#[doc =
"Checked wrapper for `SETCAD4R`. Calls `SETCAD4R_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 583, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn SETCAD4R(e: SEXP, y: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
SETCAD4R_unchecked(e, y)
})
});
result.0
}
#[doc =
"Checked wrapper for `LOGICAL_OR_NULL`. Calls `LOGICAL_OR_NULL_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 584, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn LOGICAL_OR_NULL(x: SEXP) -> *const ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
LOGICAL_OR_NULL_unchecked(x)
})
});
result.0
}
#[doc =
"Checked wrapper for `INTEGER_OR_NULL`. Calls `INTEGER_OR_NULL_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 585, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn INTEGER_OR_NULL(x: SEXP) -> *const ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
INTEGER_OR_NULL_unchecked(x)
})
});
result.0
}
#[doc =
"Checked wrapper for `REAL_OR_NULL`. Calls `REAL_OR_NULL_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 586, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn REAL_OR_NULL(x: SEXP) -> *const f64 {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
REAL_OR_NULL_unchecked(x)
})
});
result.0
}
#[doc =
"Checked wrapper for `COMPLEX_OR_NULL`. Calls `COMPLEX_OR_NULL_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 587, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn COMPLEX_OR_NULL(x: SEXP) -> *const Rcomplex {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
COMPLEX_OR_NULL_unchecked(x)
})
});
result.0
}
#[doc =
"Checked wrapper for `RAW_OR_NULL`. Calls `RAW_OR_NULL_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 588, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn RAW_OR_NULL(x: SEXP) -> *const Rbyte {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
RAW_OR_NULL_unchecked(x)
})
});
result.0
}
#[doc =
"Checked wrapper for `INTEGER_ELT`. Calls `INTEGER_ELT_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 591, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn INTEGER_ELT(x: SEXP, i: R_xlen_t) -> ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
INTEGER_ELT_unchecked(x, i)
})
});
result.0
}
#[doc =
"Checked wrapper for `REAL_ELT`. Calls `REAL_ELT_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 592, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn REAL_ELT(x: SEXP, i: R_xlen_t) -> f64 {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
REAL_ELT_unchecked(x, i)
})
});
result.0
}
#[doc =
"Checked wrapper for `LOGICAL_ELT`. Calls `LOGICAL_ELT_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 593, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn LOGICAL_ELT(x: SEXP, i: R_xlen_t) -> ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
LOGICAL_ELT_unchecked(x, i)
})
});
result.0
}
#[doc =
"Checked wrapper for `COMPLEX_ELT`. Calls `COMPLEX_ELT_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 594, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn COMPLEX_ELT(x: SEXP, i: R_xlen_t) -> Rcomplex {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
COMPLEX_ELT_unchecked(x, i)
})
});
result.0
}
#[doc =
"Checked wrapper for `RAW_ELT`. Calls `RAW_ELT_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 595, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn RAW_ELT(x: SEXP, i: R_xlen_t) -> Rbyte {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
RAW_ELT_unchecked(x, i)
})
});
result.0
}
#[doc =
"Checked wrapper for `VECTOR_ELT`. Calls `VECTOR_ELT_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 596, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn VECTOR_ELT(x: SEXP, i: R_xlen_t) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
VECTOR_ELT_unchecked(x, i)
})
});
result.0
}
#[doc =
"Checked wrapper for `STRING_ELT`. Calls `STRING_ELT_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 597, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn STRING_ELT(x: SEXP, i: R_xlen_t) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
STRING_ELT_unchecked(x, i)
})
});
result.0
}
#[doc =
"Checked wrapper for `SET_STRING_ELT`. Calls `SET_STRING_ELT_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 598, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn SET_STRING_ELT(x: SEXP, i: R_xlen_t, v: SEXP) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
SET_STRING_ELT_unchecked(x, i, v)
})
});
result.0
}
#[doc =
"Checked wrapper for `SET_LOGICAL_ELT`. Calls `SET_LOGICAL_ELT_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 599, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn SET_LOGICAL_ELT(x: SEXP, i: R_xlen_t,
v: ::std::os::raw::c_int) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
SET_LOGICAL_ELT_unchecked(x, i, v)
})
});
result.0
}
#[doc =
"Checked wrapper for `SET_INTEGER_ELT`. Calls `SET_INTEGER_ELT_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 600, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn SET_INTEGER_ELT(x: SEXP, i: R_xlen_t,
v: ::std::os::raw::c_int) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
SET_INTEGER_ELT_unchecked(x, i, v)
})
});
result.0
}
#[doc =
"Checked wrapper for `SET_REAL_ELT`. Calls `SET_REAL_ELT_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 601, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn SET_REAL_ELT(x: SEXP, i: R_xlen_t, v: f64) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
SET_REAL_ELT_unchecked(x, i, v)
})
});
result.0
}
#[doc =
"Checked wrapper for `SET_COMPLEX_ELT`. Calls `SET_COMPLEX_ELT_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 602, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn SET_COMPLEX_ELT(x: SEXP, i: R_xlen_t, v: Rcomplex) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
SET_COMPLEX_ELT_unchecked(x, i, v)
})
});
result.0
}
#[doc =
"Checked wrapper for `SET_RAW_ELT`. Calls `SET_RAW_ELT_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 603, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn SET_RAW_ELT(x: SEXP, i: R_xlen_t, v: Rbyte) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
SET_RAW_ELT_unchecked(x, i, v)
})
});
result.0
}
#[doc =
"Checked wrapper for `SET_VECTOR_ELT`. Calls `SET_VECTOR_ELT_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 604, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn SET_VECTOR_ELT(x: SEXP, i: R_xlen_t, v: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
SET_VECTOR_ELT_unchecked(x, i, v)
})
});
result.0
}
#[doc = " Get the length of a SEXP as `int` (for short vectors < 2^31)."]
#[doc = ""]
#[doc = " For long vectors, use `Rf_xlength()` instead."]
#[doc = " Returns 0 for R_NilValue."]
#[doc =
"Checked wrapper for `LENGTH`. Calls `LENGTH_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 614, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn LENGTH(x: SEXP) -> ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
LENGTH_unchecked(x)
})
});
result.0
}
#[doc = " Get the length of a SEXP as `R_xlen_t` (supports long vectors)."]
#[doc = ""]
#[doc = " ALTREP-aware: will call ALTREP Length method if needed."]
#[doc =
"Checked wrapper for `XLENGTH`. Calls `XLENGTH_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 619, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn XLENGTH(x: SEXP) -> R_xlen_t {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
XLENGTH_unchecked(x)
})
});
result.0
}
#[doc = " Non-zero if `x` has any attributes (`ATTRIB(x) != R_NilValue`)."]
#[doc = ""]
#[doc =
" The API replacement for testing `ATTRIB`. R 4.5.0 added it: R 4.4\'s"]
#[doc = " libR does not export it, so a package that references it fails to"]
#[doc = " load there, and it is declared only when building against R >= 4.5"]
#[doc =
" (`r_4_5`, #1905). `SexpExt::has_attributes` works on R 4.4 as well."]
#[doc = " Unlike `attributes()`, it ignores the tag names of a pairlist."]
#[doc(alias = "NO_ATTRIB")]
#[doc =
"Checked wrapper for `ANY_ATTRIB`. Calls `ANY_ATTRIB_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 630, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn ANY_ATTRIB(x: SEXP) -> ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
ANY_ATTRIB_unchecked(x)
})
});
result.0
}
#[doc =
"Checked wrapper for `ALTREP_CLASS`. Calls `ALTREP_CLASS_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 688, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn ALTREP_CLASS(x: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
ALTREP_CLASS_unchecked(x)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_altrep_data1`. Calls `R_altrep_data1_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 689, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_altrep_data1(x: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_altrep_data1_unchecked(x)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_altrep_data2`. Calls `R_altrep_data2_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 690, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_altrep_data2(x: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_altrep_data2_unchecked(x)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_set_altrep_data1`. Calls `R_set_altrep_data1_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 691, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_set_altrep_data1(x: SEXP, v: SEXP) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_set_altrep_data1_unchecked(x, v)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_set_altrep_data2`. Calls `R_set_altrep_data2_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 692, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_set_altrep_data2(x: SEXP, v: SEXP) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_set_altrep_data2_unchecked(x, v)
})
});
result.0
}
#[doc = " Check if a SEXP is an ALTREP object (returns non-zero if true)."]
#[doc = ""]
#[doc = " Use `SexpExt::is_altrep()` instead of calling this directly."]
#[doc =
"Checked wrapper for `ALTREP`. Calls `ALTREP_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 697, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn ALTREP(x: SEXP) -> ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
ALTREP_unchecked(x)
})
});
result.0
}
#[doc = " Get mutable pointer to logical vector data."]
#[doc = ""]
#[doc = " For ALTREP vectors, this may force materialization."]
#[doc = " Get mutable pointer to logical vector data."]
#[doc = ""]
#[doc = " For ALTREP vectors, this may force materialization."]
#[doc = " Prefer `SexpExt::set_logical_elt()` / `SexpExt::logical_elt()`."]
#[doc =
"Checked wrapper for `LOGICAL`. Calls `LOGICAL_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 712, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn LOGICAL(x: SEXP) -> *mut ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
LOGICAL_unchecked(x)
})
});
result.0
}
#[doc = " Get mutable pointer to integer vector data."]
#[doc = ""]
#[doc = " For ALTREP vectors, this may force materialization."]
#[doc = " Prefer `SexpExt::set_integer_elt()` / `SexpExt::integer_elt()`."]
#[doc =
"Checked wrapper for `INTEGER`. Calls `INTEGER_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 718, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn INTEGER(x: SEXP) -> *mut ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
INTEGER_unchecked(x)
})
});
result.0
}
#[doc = " Get mutable pointer to real vector data."]
#[doc = ""]
#[doc = " For ALTREP vectors, this may force materialization."]
#[doc = " Prefer `SexpExt::set_real_elt()` / `SexpExt::real_elt()`."]
#[doc =
"Checked wrapper for `REAL`. Calls `REAL_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 724, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn REAL(x: SEXP) -> *mut f64 {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
REAL_unchecked(x)
})
});
result.0
}
#[doc = " Get mutable pointer to complex vector data."]
#[doc = ""]
#[doc = " For ALTREP vectors, this may force materialization."]
#[doc = " Prefer `SexpExt::set_complex_elt()` / `SexpExt::complex_elt()`."]
#[doc =
"Checked wrapper for `COMPLEX`. Calls `COMPLEX_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 730, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn COMPLEX(x: SEXP) -> *mut Rcomplex {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
COMPLEX_unchecked(x)
})
});
result.0
}
#[doc = " Get mutable pointer to raw vector data."]
#[doc = ""]
#[doc = " For ALTREP vectors, this may force materialization."]
#[doc = " Prefer `SexpExt::set_raw_elt()` / `SexpExt::raw_elt()`."]
#[doc =
"Checked wrapper for `RAW`. Calls `RAW_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 736, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn RAW(x: SEXP) -> *mut Rbyte {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
RAW_unchecked(x)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_CheckUserInterrupt`. Calls `R_CheckUserInterrupt_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 743, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_CheckUserInterrupt() {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_CheckUserInterrupt_unchecked()
})
});
result.0
}
#[doc =
"Checked wrapper for `TYPEOF`. Calls `TYPEOF_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 749, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn TYPEOF(x: SEXP) -> SEXPTYPE {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
TYPEOF_unchecked(x)
})
});
result.0
}
#[doc(alias = "install")]
#[doc =
"Checked wrapper for `Rf_install`. Calls `Rf_install_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 755, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_install(name: *const ::std::os::raw::c_char) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_install_unchecked(name)
})
});
result.0
}
#[doc = " Get the print name (CHARSXP) of a symbol (SYMSXP)"]
#[doc =
"Checked wrapper for `PRINTNAME`. Calls `PRINTNAME_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 757, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn PRINTNAME(x: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
PRINTNAME_unchecked(x)
})
});
result.0
}
#[doc =
" Get the C string pointer from a CHARSXP — encapsulated by SexpExt::r_char()"]
#[doc(alias = "CHAR")]
#[doc =
"Checked wrapper for `R_CHAR`. Calls `R_CHAR_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 760, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_CHAR(x: SEXP) -> *const ::std::os::raw::c_char {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_CHAR_unchecked(x)
})
});
result.0
}
#[doc = " Read an attribute from an object by symbol (e.g. `R_NamesSymbol`)."]
#[doc = ""]
#[doc = " Returns `R_NilValue` if the attribute is not set."]
#[doc(alias = "getAttrib")]
#[doc =
"Checked wrapper for `Rf_getAttrib`. Calls `Rf_getAttrib_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 768, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_getAttrib(vec: SEXP, name: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_getAttrib_unchecked(vec, name)
})
});
result.0
}
#[doc = " Set the `names` attribute; returns the updated object."]
#[doc(alias = "namesgets")]
#[doc =
"Checked wrapper for `Rf_namesgets`. Calls `Rf_namesgets_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 771, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_namesgets(vec: SEXP, val: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_namesgets_unchecked(vec, val)
})
});
result.0
}
#[doc = " Set the `dim` attribute; returns the updated object."]
#[doc(alias = "dimgets")]
#[doc =
"Checked wrapper for `Rf_dimgets`. Calls `Rf_dimgets_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 774, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_dimgets(vec: SEXP, val: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_dimgets_unchecked(vec, val)
})
});
result.0
}
#[doc(alias = "duplicate")]
#[doc =
"Checked wrapper for `Rf_duplicate`. Calls `Rf_duplicate_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 778, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_duplicate(s: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_duplicate_unchecked(s)
})
});
result.0
}
#[doc(alias = "shallow_duplicate")]
#[doc =
"Checked wrapper for `Rf_shallow_duplicate`. Calls `Rf_shallow_duplicate_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 780, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_shallow_duplicate(s: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_shallow_duplicate_unchecked(s)
})
});
result.0
}
#[doc = " Check if two R objects are identical (deep semantic equality)."]
#[doc = ""]
#[doc = " This is the C implementation of R\'s `identical()` function."]
#[doc = ""]
#[doc = " # Flags"]
#[doc = ""]
#[doc =
" Use the `IDENT_*` constants below. Flags are inverted: set bit = disable that check."]
#[doc = ""]
#[doc =
" **Default from R**: `IDENT_USE_CLOENV` (16) - ignore closure environments"]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc = " `TRUE` if identical, `FALSE` otherwise."]
#[doc = ""]
#[doc = " # Performance"]
#[doc = ""]
#[doc = " Fast-path: Returns `TRUE` immediately if pointers are equal."]
#[doc =
"Checked wrapper for `R_compute_identical`. Calls `R_compute_identical_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 800, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_compute_identical(x: SEXP, y: SEXP,
flags: ::std::os::raw::c_int) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_compute_identical_unchecked(x, y, flags)
})
});
result.0
}#[r_ffi_checked]
250#[allow(clashing_extern_declarations)]
251unsafe extern "C-unwind" {
252 pub static R_NilValue: SEXP;
254
255 #[doc(alias = "NA_STRING")]
256 pub static R_NaString: SEXP;
258 pub static R_BlankString: SEXP;
260 pub static R_NamesSymbol: SEXP;
263 pub static R_DimSymbol: SEXP;
264 pub static R_DimNamesSymbol: SEXP;
265 pub static R_ClassSymbol: SEXP;
266 pub static R_RowNamesSymbol: SEXP;
267 pub static R_LevelsSymbol: SEXP;
268 pub static R_TspSymbol: SEXP;
269
270 pub static R_GlobalEnv: SEXP;
272 pub static R_BaseEnv: SEXP;
274 pub static R_EmptyEnv: SEXP;
276 pub static R_BaseNamespace: SEXP;
278
279 pub static R_MissingArg: SEXP;
289
290 pub static R_UnboundValue: SEXP;
293
294 pub(crate) fn R_FlushConsole();
297
298 #[cfg(feature = "nonapi")]
301 pub static R_TrueValue: SEXP;
303 #[cfg(feature = "nonapi")]
304 pub static R_FalseValue: SEXP;
306 #[cfg(feature = "nonapi")]
307 pub static R_LogicalNAValue: SEXP;
309
310 #[doc(alias = "mkChar")]
312 pub fn Rf_mkChar(s: *const ::std::os::raw::c_char) -> SEXP;
313 #[doc(alias = "mkCharLen")]
314 pub fn Rf_mkCharLen(s: *const ::std::os::raw::c_char, len: i32) -> SEXP;
315 #[doc(alias = "mkCharLenCE")]
316 pub fn Rf_mkCharLenCE(
317 x: *const ::std::os::raw::c_char,
318 len: ::std::os::raw::c_int,
319 ce: cetype_t,
320 ) -> SEXP;
321 #[doc(alias = "xlength")]
322 #[doc(alias = "XLENGTH")]
323 pub fn Rf_xlength(x: SEXP) -> R_xlen_t;
324 #[doc(alias = "translateCharUTF8")]
325 pub fn Rf_translateCharUTF8(x: SEXP) -> *const ::std::os::raw::c_char;
326 #[doc(alias = "getCharCE")]
327 pub fn Rf_getCharCE(x: SEXP) -> cetype_t;
328 #[doc(alias = "charIsASCII")]
329 pub fn Rf_charIsASCII(x: SEXP) -> Rboolean;
330 #[doc(alias = "charIsUTF8")]
331 pub fn Rf_charIsUTF8(x: SEXP) -> Rboolean;
332 #[doc(alias = "charIsLatin1")]
333 pub fn Rf_charIsLatin1(x: SEXP) -> Rboolean;
334
335 pub(crate) fn R_MakeUnwindCont() -> SEXP;
337 pub(crate) fn R_ContinueUnwind(cont: SEXP) -> !;
338 pub(crate) fn R_UnwindProtect(
339 fun: ::std::option::Option<
340 unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void) -> SEXP,
341 >,
342 fun_data: *mut ::std::os::raw::c_void,
343 cleanfun: ::std::option::Option<
344 unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void, Rboolean),
345 >,
346 cleanfun_data: *mut ::std::os::raw::c_void,
347 cont: SEXP,
348 ) -> SEXP;
349
350 #[link_name = "R_UnwindProtect"]
352 pub(crate) fn R_UnwindProtect_C_unwind(
353 fun: ::std::option::Option<
354 unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void) -> SEXP,
355 >,
356 fun_data: *mut ::std::os::raw::c_void,
357 cleanfun: ::std::option::Option<
358 unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void, Rboolean),
359 >,
360 cleanfun_data: *mut ::std::os::raw::c_void,
361 cont: SEXP,
362 ) -> SEXP;
363
364 #[doc = " External pointer interface"]
367 pub(crate) fn R_MakeExternalPtr(p: *mut ::std::os::raw::c_void, tag: SEXP, prot: SEXP) -> SEXP;
368 pub fn R_ExternalPtrAddr(s: SEXP) -> *mut ::std::os::raw::c_void;
369 pub(crate) fn R_ExternalPtrTag(s: SEXP) -> SEXP;
370 pub(crate) fn R_ExternalPtrProtected(s: SEXP) -> SEXP;
371 pub(crate) fn R_ClearExternalPtr(s: SEXP);
372 pub(crate) fn R_SetExternalPtrAddr(s: SEXP, p: *mut ::std::os::raw::c_void);
373 pub(crate) fn R_SetExternalPtrTag(s: SEXP, tag: SEXP);
374 pub(crate) fn R_SetExternalPtrProtected(s: SEXP, p: SEXP);
375 #[doc = " Added in R 3.4.0"]
376 pub fn R_MakeExternalPtrFn(p: DL_FUNC, tag: SEXP, prot: SEXP) -> SEXP;
377 pub fn R_ExternalPtrAddrFn(s: SEXP) -> DL_FUNC;
378 pub fn R_RegisterFinalizer(s: SEXP, fun: SEXP);
379 pub(crate) fn R_RegisterCFinalizer(s: SEXP, fun: R_CFinalizer_t);
380 pub fn R_RegisterFinalizerEx(s: SEXP, fun: SEXP, onexit: Rboolean);
381 pub(crate) fn R_RegisterCFinalizerEx(s: SEXP, fun: R_CFinalizer_t, onexit: Rboolean);
382
383 pub(crate) fn R_RegisterCCallable(
387 package: *const ::std::os::raw::c_char,
388 name: *const ::std::os::raw::c_char,
389 fptr: DL_FUNC,
390 );
391 pub(crate) fn R_GetCCallable(
393 package: *const ::std::os::raw::c_char,
394 name: *const ::std::os::raw::c_char,
395 ) -> DL_FUNC;
396
397 #[doc(alias = "PROTECT")]
439 #[doc(alias = "protect")]
440 pub fn Rf_protect(s: SEXP) -> SEXP;
441
442 #[doc(alias = "UNPROTECT")]
449 #[doc(alias = "unprotect")]
450 pub fn Rf_unprotect(l: ::std::os::raw::c_int);
451
452 #[doc(alias = "UNPROTECT_PTR")]
462 pub fn Rf_unprotect_ptr(s: SEXP);
463
464 pub fn R_PreserveObject(object: SEXP);
472
473 pub fn R_ReleaseObject(object: SEXP);
479
480 #[doc(alias = "allocVector")]
483 pub fn Rf_allocVector(sexptype: SEXPTYPE, length: R_xlen_t) -> SEXP;
484 #[doc(alias = "allocMatrix")]
485 pub fn Rf_allocMatrix(
486 sexptype: SEXPTYPE,
487 nrow: ::std::os::raw::c_int,
488 ncol: ::std::os::raw::c_int,
489 ) -> SEXP;
490 #[doc(alias = "allocArray")]
491 pub fn Rf_allocArray(sexptype: SEXPTYPE, dims: SEXP) -> SEXP;
492 #[doc(alias = "alloc3DArray")]
493 pub fn Rf_alloc3DArray(
494 sexptype: SEXPTYPE,
495 nrow: ::std::os::raw::c_int,
496 ncol: ::std::os::raw::c_int,
497 nface: ::std::os::raw::c_int,
498 ) -> SEXP;
499
500 #[doc(alias = "allocList")]
503 pub(crate) fn Rf_allocList(n: ::std::os::raw::c_int) -> SEXP;
504 #[doc(alias = "allocLang")]
507 pub fn Rf_allocLang(n: ::std::os::raw::c_int) -> SEXP;
508 #[doc(alias = "allocS4Object")]
509 pub fn Rf_allocS4Object() -> SEXP;
510
511 pub fn Rf_cons(car: SEXP, cdr: SEXP) -> SEXP;
513 pub fn Rf_lcons(car: SEXP, cdr: SEXP) -> SEXP;
514
515 #[doc(alias = "setAttrib")]
517 pub fn Rf_setAttrib(vec: SEXP, name: SEXP, val: SEXP) -> SEXP;
518
519 #[doc(alias = "ScalarComplex")]
521 pub fn Rf_ScalarComplex(x: Rcomplex) -> SEXP;
522 #[doc(alias = "ScalarInteger")]
523 pub fn Rf_ScalarInteger(x: ::std::os::raw::c_int) -> SEXP;
524 #[doc(alias = "ScalarLogical")]
525 pub fn Rf_ScalarLogical(x: ::std::os::raw::c_int) -> SEXP;
526 #[doc(alias = "ScalarRaw")]
527 pub fn Rf_ScalarRaw(x: Rbyte) -> SEXP;
528 #[doc(alias = "ScalarReal")]
529 pub fn Rf_ScalarReal(x: f64) -> SEXP;
530 #[doc(alias = "ScalarString")]
531 pub fn Rf_ScalarString(x: SEXP) -> SEXP;
532
533 #[cfg(feature = "nonapi")]
537 pub(crate) fn DATAPTR(x: SEXP) -> *mut ::std::os::raw::c_void;
538 pub fn DATAPTR_RO(x: SEXP) -> *const ::std::os::raw::c_void;
539 pub fn DATAPTR_OR_NULL(x: SEXP) -> *const ::std::os::raw::c_void;
540
541 pub fn CAR(e: SEXP) -> SEXP;
568 pub fn CDR(e: SEXP) -> SEXP;
569 pub fn CAAR(e: SEXP) -> SEXP;
570 pub fn CDAR(e: SEXP) -> SEXP;
571 pub fn CADR(e: SEXP) -> SEXP;
572 pub fn CDDR(e: SEXP) -> SEXP;
573 pub fn CADDR(e: SEXP) -> SEXP;
574 pub fn CADDDR(e: SEXP) -> SEXP;
575 pub fn CAD4R(e: SEXP) -> SEXP;
576 pub fn TAG(e: SEXP) -> SEXP;
577 pub fn SET_TAG(x: SEXP, y: SEXP);
578 pub fn SETCAR(x: SEXP, y: SEXP) -> SEXP;
579 pub fn SETCDR(x: SEXP, y: SEXP) -> SEXP;
580 pub fn SETCADR(x: SEXP, y: SEXP) -> SEXP;
581 pub fn SETCADDR(x: SEXP, y: SEXP) -> SEXP;
582 pub fn SETCADDDR(x: SEXP, y: SEXP) -> SEXP;
583 pub fn SETCAD4R(e: SEXP, y: SEXP) -> SEXP;
584 pub fn LOGICAL_OR_NULL(x: SEXP) -> *const ::std::os::raw::c_int;
585 pub fn INTEGER_OR_NULL(x: SEXP) -> *const ::std::os::raw::c_int;
586 pub fn REAL_OR_NULL(x: SEXP) -> *const f64;
587 pub fn COMPLEX_OR_NULL(x: SEXP) -> *const Rcomplex;
588 pub fn RAW_OR_NULL(x: SEXP) -> *const Rbyte;
589
590 pub fn INTEGER_ELT(x: SEXP, i: R_xlen_t) -> ::std::os::raw::c_int;
592 pub fn REAL_ELT(x: SEXP, i: R_xlen_t) -> f64;
593 pub fn LOGICAL_ELT(x: SEXP, i: R_xlen_t) -> ::std::os::raw::c_int;
594 pub fn COMPLEX_ELT(x: SEXP, i: R_xlen_t) -> Rcomplex;
595 pub fn RAW_ELT(x: SEXP, i: R_xlen_t) -> Rbyte;
596 pub fn VECTOR_ELT(x: SEXP, i: R_xlen_t) -> SEXP;
597 pub fn STRING_ELT(x: SEXP, i: R_xlen_t) -> SEXP;
598 pub fn SET_STRING_ELT(x: SEXP, i: R_xlen_t, v: SEXP);
599 pub fn SET_LOGICAL_ELT(x: SEXP, i: R_xlen_t, v: ::std::os::raw::c_int);
600 pub fn SET_INTEGER_ELT(x: SEXP, i: R_xlen_t, v: ::std::os::raw::c_int);
601 pub fn SET_REAL_ELT(x: SEXP, i: R_xlen_t, v: f64);
602 pub fn SET_COMPLEX_ELT(x: SEXP, i: R_xlen_t, v: Rcomplex);
603 pub fn SET_RAW_ELT(x: SEXP, i: R_xlen_t, v: Rbyte);
604 pub fn SET_VECTOR_ELT(x: SEXP, i: R_xlen_t, v: SEXP) -> SEXP;
605
606 pub fn LENGTH(x: SEXP) -> ::std::os::raw::c_int;
615
616 pub fn XLENGTH(x: SEXP) -> R_xlen_t;
620
621 #[cfg(r_4_5)]
629 #[doc(alias = "NO_ATTRIB")]
630 pub fn ANY_ATTRIB(x: SEXP) -> ::std::os::raw::c_int;
631
632 #[cfg(feature = "nonapi")]
644 pub fn ATTRIB(x: SEXP) -> SEXP;
645
646 #[cfg(feature = "nonapi")]
656 pub fn SET_ATTRIB(x: SEXP, v: SEXP);
657
658 #[cfg(feature = "nonapi")]
663 pub fn OBJECT(x: SEXP) -> ::std::os::raw::c_int;
664
665 #[cfg(feature = "nonapi")]
668 pub fn SET_OBJECT(x: SEXP, v: ::std::os::raw::c_int);
669
670 #[cfg(feature = "nonapi")]
675 pub fn LEVELS(x: SEXP) -> ::std::os::raw::c_int;
676
677 #[cfg(feature = "nonapi")]
681 pub fn SETLEVELS(x: SEXP, v: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
682
683 pub(crate) fn ALTREP_CLASS(x: SEXP) -> SEXP;
689 pub fn R_altrep_data1(x: SEXP) -> SEXP;
690 pub fn R_altrep_data2(x: SEXP) -> SEXP;
691 pub fn R_set_altrep_data1(x: SEXP, v: SEXP);
692 pub fn R_set_altrep_data2(x: SEXP, v: SEXP);
693
694 pub fn ALTREP(x: SEXP) -> ::std::os::raw::c_int;
698
699 pub(crate) fn LOGICAL(x: SEXP) -> *mut ::std::os::raw::c_int;
713
714 pub(crate) fn INTEGER(x: SEXP) -> *mut ::std::os::raw::c_int;
719
720 pub(crate) fn REAL(x: SEXP) -> *mut f64;
725
726 pub(crate) fn COMPLEX(x: SEXP) -> *mut Rcomplex;
731
732 pub(crate) fn RAW(x: SEXP) -> *mut Rbyte;
737
738 pub fn R_CheckUserInterrupt();
744
745 pub fn TYPEOF(x: SEXP) -> SEXPTYPE;
750
751 #[doc(alias = "install")]
755 pub fn Rf_install(name: *const ::std::os::raw::c_char) -> SEXP;
756 pub fn PRINTNAME(x: SEXP) -> SEXP;
758 #[doc(alias = "CHAR")]
760 pub fn R_CHAR(x: SEXP) -> *const ::std::os::raw::c_char;
761
762 #[doc(alias = "getAttrib")]
768 pub fn Rf_getAttrib(vec: SEXP, name: SEXP) -> SEXP;
769 #[doc(alias = "namesgets")]
771 pub fn Rf_namesgets(vec: SEXP, val: SEXP) -> SEXP;
772 #[doc(alias = "dimgets")]
774 pub fn Rf_dimgets(vec: SEXP, val: SEXP) -> SEXP;
775
776 #[doc(alias = "duplicate")]
778 pub fn Rf_duplicate(s: SEXP) -> SEXP;
779 #[doc(alias = "shallow_duplicate")]
780 pub fn Rf_shallow_duplicate(s: SEXP) -> SEXP;
781
782 pub fn R_compute_identical(x: SEXP, y: SEXP, flags: ::std::os::raw::c_int) -> Rboolean;
801}
802
803pub const IDENT_NUM_AS_BITS: ::std::os::raw::c_int = 1;
805pub const IDENT_NA_AS_BITS: ::std::os::raw::c_int = 2;
807pub const IDENT_ATTR_BY_ORDER: ::std::os::raw::c_int = 4;
809pub const IDENT_USE_BYTECODE: ::std::os::raw::c_int = 8;
811pub const IDENT_USE_CLOENV: ::std::os::raw::c_int = 16;
813pub const IDENT_USE_SRCREF: ::std::os::raw::c_int = 32;
815pub const IDENT_EXTPTR_AS_REF: ::std::os::raw::c_int = 64;
817
818#[allow(missing_docs)]
820#[allow(missing_docs)]
unsafe extern "C-unwind" {
#[doc(alias = "asLogical")]
#[doc = "Unchecked FFI binding for `Rf_asLogical`."]
#[doc = "Generated from source location line 824, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_asLogical"]
pub fn Rf_asLogical_unchecked(x: SEXP)
-> ::std::os::raw::c_int;
#[doc(alias = "asInteger")]
#[doc = "Unchecked FFI binding for `Rf_asInteger`."]
#[doc = "Generated from source location line 826, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_asInteger"]
pub fn Rf_asInteger_unchecked(x: SEXP)
-> ::std::os::raw::c_int;
#[doc(alias = "asReal")]
#[doc = "Unchecked FFI binding for `Rf_asReal`."]
#[doc = "Generated from source location line 828, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_asReal"]
pub fn Rf_asReal_unchecked(x: SEXP)
-> f64;
#[doc(alias = "asChar")]
#[doc = "Unchecked FFI binding for `Rf_asChar`."]
#[doc = "Generated from source location line 830, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_asChar"]
pub fn Rf_asChar_unchecked(x: SEXP)
-> SEXP;
#[doc(alias = "coerceVector")]
#[doc = "Unchecked FFI binding for `Rf_coerceVector`."]
#[doc = "Generated from source location line 832, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_coerceVector"]
pub fn Rf_coerceVector_unchecked(v: SEXP, sexptype: SEXPTYPE)
-> SEXP;
#[doc(alias = "nrows")]
#[doc = "Unchecked FFI binding for `Rf_nrows`."]
#[doc = "Generated from source location line 836, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_nrows"]
pub fn Rf_nrows_unchecked(x: SEXP)
-> ::std::os::raw::c_int;
#[doc(alias = "ncols")]
#[doc = "Unchecked FFI binding for `Rf_ncols`."]
#[doc = "Generated from source location line 838, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_ncols"]
pub fn Rf_ncols_unchecked(x: SEXP)
-> ::std::os::raw::c_int;
#[doc(alias = "inherits")]
#[doc = "Unchecked FFI binding for `Rf_inherits`."]
#[doc = "Generated from source location line 842, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_inherits"]
pub fn Rf_inherits_unchecked(x: SEXP,
klass: *const ::std::os::raw::c_char)
-> Rboolean;
#[doc(alias = "isNull")]
#[doc = "Unchecked FFI binding for `Rf_isNull`."]
#[doc = "Generated from source location line 846, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isNull"]
pub fn Rf_isNull_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "isSymbol")]
#[doc = "Unchecked FFI binding for `Rf_isSymbol`."]
#[doc = "Generated from source location line 848, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isSymbol"]
pub fn Rf_isSymbol_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "isLogical")]
#[doc = "Unchecked FFI binding for `Rf_isLogical`."]
#[doc = "Generated from source location line 850, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isLogical"]
pub fn Rf_isLogical_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "isReal")]
#[doc = "Unchecked FFI binding for `Rf_isReal`."]
#[doc = "Generated from source location line 852, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isReal"]
pub fn Rf_isReal_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "isComplex")]
#[doc = "Unchecked FFI binding for `Rf_isComplex`."]
#[doc = "Generated from source location line 854, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isComplex"]
pub fn Rf_isComplex_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "isExpression")]
#[doc = "Unchecked FFI binding for `Rf_isExpression`."]
#[doc = "Generated from source location line 856, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isExpression"]
pub fn Rf_isExpression_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "isEnvironment")]
#[doc = "Unchecked FFI binding for `Rf_isEnvironment`."]
#[doc = "Generated from source location line 858, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isEnvironment"]
pub fn Rf_isEnvironment_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "isString")]
#[doc = "Unchecked FFI binding for `Rf_isString`."]
#[doc = "Generated from source location line 860, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isString"]
pub fn Rf_isString_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "isArray")]
#[doc = "Unchecked FFI binding for `Rf_isArray`."]
#[doc = "Generated from source location line 864, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isArray"]
pub fn Rf_isArray_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "isMatrix")]
#[doc = "Unchecked FFI binding for `Rf_isMatrix`."]
#[doc = "Generated from source location line 866, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isMatrix"]
pub fn Rf_isMatrix_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "isList")]
#[doc = "Unchecked FFI binding for `Rf_isList`."]
#[doc = "Generated from source location line 868, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isList"]
pub fn Rf_isList_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "isNewList")]
#[doc = "Unchecked FFI binding for `Rf_isNewList`."]
#[doc = "Generated from source location line 870, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isNewList"]
pub fn Rf_isNewList_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "isPairList")]
#[doc = "Unchecked FFI binding for `Rf_isPairList`."]
#[doc = "Generated from source location line 872, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isPairList"]
pub fn Rf_isPairList_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "isFunction")]
#[doc = "Unchecked FFI binding for `Rf_isFunction`."]
#[doc = "Generated from source location line 874, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isFunction"]
pub fn Rf_isFunction_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "isPrimitive")]
#[doc = "Unchecked FFI binding for `Rf_isPrimitive`."]
#[doc = "Generated from source location line 876, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isPrimitive"]
pub fn Rf_isPrimitive_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "isLanguage")]
#[doc = "Unchecked FFI binding for `Rf_isLanguage`."]
#[doc = "Generated from source location line 878, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isLanguage"]
pub fn Rf_isLanguage_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "isDataFrame")]
#[doc = "Unchecked FFI binding for `Rf_isDataFrame`."]
#[doc = "Generated from source location line 880, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isDataFrame"]
pub fn Rf_isDataFrame_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "isFactor")]
#[doc = "Unchecked FFI binding for `Rf_isFactor`."]
#[doc = "Generated from source location line 882, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isFactor"]
pub fn Rf_isFactor_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "isInteger")]
#[doc = "Unchecked FFI binding for `Rf_isInteger`."]
#[doc = "Generated from source location line 884, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isInteger"]
pub fn Rf_isInteger_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "isObject")]
#[doc = "Unchecked FFI binding for `Rf_isObject`."]
#[doc = "Generated from source location line 886, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isObject"]
pub fn Rf_isObject_unchecked(s: SEXP)
-> Rboolean;
#[doc(alias = "elt")]
#[doc = "Unchecked FFI binding for `Rf_elt`."]
#[doc = "Generated from source location line 890, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_elt"]
pub fn Rf_elt_unchecked(list: SEXP, i: ::std::os::raw::c_int)
-> SEXP;
#[doc(alias = "lastElt")]
#[doc = "Unchecked FFI binding for `Rf_lastElt`."]
#[doc = "Generated from source location line 892, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_lastElt"]
pub fn Rf_lastElt_unchecked(list: SEXP)
-> SEXP;
#[doc(alias = "nthcdr")]
#[doc = "Unchecked FFI binding for `Rf_nthcdr`."]
#[doc = "Generated from source location line 894, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_nthcdr"]
pub fn Rf_nthcdr_unchecked(list: SEXP, n: ::std::os::raw::c_int)
-> SEXP;
#[doc(alias = "listAppend")]
#[doc = "Unchecked FFI binding for `Rf_listAppend`."]
#[doc = "Generated from source location line 896, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_listAppend"]
pub fn Rf_listAppend_unchecked(s: SEXP, t: SEXP)
-> SEXP;
#[doc = " Set the class attribute of a vector."]
#[doc = ""]
#[doc = " Equivalent to R\'s `class(vec) <- klass` syntax."]
#[doc = " The \"gets\" suffix indicates this is a setter function."]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc = " Returns the modified vector (like all \"*gets\" functions)."]
#[doc(alias = "classgets")]
#[doc = "Unchecked FFI binding for `Rf_classgets`."]
#[doc = "Generated from source location line 912, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_classgets"]
pub fn Rf_classgets_unchecked(vec: SEXP, klass: SEXP)
-> SEXP;
#[doc = " Set the dimnames attribute of an array/matrix."]
#[doc = ""]
#[doc = " Equivalent to R\'s `dimnames(vec) <- val` syntax."]
#[doc = " The \"gets\" suffix indicates this is a setter function."]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc = " Returns the modified vector."]
#[doc(alias = "dimnamesgets")]
#[doc = "Unchecked FFI binding for `Rf_dimnamesgets`."]
#[doc = "Generated from source location line 923, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_dimnamesgets"]
pub fn Rf_dimnamesgets_unchecked(vec: SEXP, val: SEXP)
-> SEXP;
#[doc(alias = "GetRowNames")]
#[doc = "Unchecked FFI binding for `Rf_GetRowNames`."]
#[doc = "Generated from source location line 926, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_GetRowNames"]
pub(crate) fn Rf_GetRowNames_unchecked(dimnames: SEXP)
-> SEXP;
#[doc(alias = "GetColNames")]
#[doc = "Unchecked FFI binding for `Rf_GetColNames`."]
#[doc = "Generated from source location line 928, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_GetColNames"]
pub(crate) fn Rf_GetColNames_unchecked(dimnames: SEXP)
-> SEXP;
#[doc =
" Single-frame (`inherits = FALSE`) or inherited variable lookup with an"]
#[doc = " `ifnotfound` default — the API-blessed replacement for"]
#[doc =
" `Rf_findVarInFrame`. R 4.5.0 added it, so it is declared only when"]
#[doc =
" building against R >= 4.5 (`r_4_5`, #1905); for R 4.4, evaluate"]
#[doc = " `base::get0()` instead."]
#[doc = " **Longjmps** if `rho` is not an environment or"]
#[doc = " the binding is `R_MissingArg`; forces promises."]
#[doc(alias = "getVarEx")]
#[doc = "Unchecked FFI binding for `R_getVarEx`."]
#[doc = "Generated from source location line 940, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_getVarEx"]
pub fn R_getVarEx_unchecked(sym: SEXP, rho: SEXP, inherits: Rboolean,
ifnotfound: SEXP)
-> SEXP;
#[doc(alias = "defineVar")]
#[doc = "Unchecked FFI binding for `Rf_defineVar`."]
#[doc = "Generated from source location line 942, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_defineVar"]
pub fn Rf_defineVar_unchecked(symbol: SEXP, value: SEXP, rho: SEXP);
#[doc(alias = "setVar")]
#[doc = "Unchecked FFI binding for `Rf_setVar`."]
#[doc = "Generated from source location line 944, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_setVar"]
pub fn Rf_setVar_unchecked(symbol: SEXP, value: SEXP, rho: SEXP);
#[doc(alias = "findFun")]
#[doc = "Unchecked FFI binding for `Rf_findFun`."]
#[doc = "Generated from source location line 946, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_findFun"]
pub fn Rf_findFun_unchecked(symbol: SEXP, rho: SEXP)
-> SEXP;
#[doc =
" Find a registered namespace by name. **Longjmps on error** — prefer"]
#[doc = " `REnv::package_namespace()` which wraps this safely."]
#[doc(alias = "FindNamespace")]
#[doc = "Unchecked FFI binding for `R_FindNamespace`."]
#[doc = "Generated from source location line 951, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_FindNamespace"]
pub fn R_FindNamespace_unchecked(info: SEXP)
-> SEXP;
#[doc =
" Return the current execution environment (innermost closure on call"]
#[doc = " stack, or `R_GlobalEnv` if none)."]
#[doc(alias = "GetCurrentEnv")]
#[doc = "Unchecked FFI binding for `R_GetCurrentEnv`."]
#[doc = "Generated from source location line 957, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_GetCurrentEnv"]
pub(crate) fn R_GetCurrentEnv_unchecked()
-> SEXP;
#[doc(alias = "eval")]
#[doc = "Unchecked FFI binding for `Rf_eval`."]
#[doc = "Generated from source location line 961, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_eval"]
pub fn Rf_eval_unchecked(expr: SEXP, rho: SEXP)
-> SEXP;
#[doc(alias = "applyClosure")]
#[doc = "Unchecked FFI binding for `Rf_applyClosure`."]
#[doc = "Generated from source location line 963, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_applyClosure"]
pub fn Rf_applyClosure_unchecked(call: SEXP, op: SEXP, args: SEXP,
rho: SEXP, suppliedvars: SEXP, check: Rboolean)
-> SEXP;
#[doc = "Unchecked FFI binding for `R_tryEval`."]
#[doc = "Generated from source location line 971, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_tryEval"]
pub fn R_tryEval_unchecked(expr: SEXP, env: SEXP,
error_occurred: *mut ::std::os::raw::c_int)
-> SEXP;
#[doc =
" Run `fun(data)` in a new top-level context: the caller\'s condition"]
#[doc =
" handlers and restarts are hidden from it, and any jump out of it"]
#[doc =
" (an unhandled error, an interrupt, an `abort` restart) stops here."]
#[doc = " `TRUE` when `fun` returned, `FALSE` after such a jump."]
#[doc(alias = "ToplevelExec")]
#[doc = "Unchecked FFI binding for `R_ToplevelExec`."]
#[doc = "Generated from source location line 981, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_ToplevelExec"]
pub(crate) fn R_ToplevelExec_unchecked(fun:
::std::option::Option<unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void)>,
data: *mut ::std::os::raw::c_void)
-> Rboolean;
#[doc =
" Call `body(bdata)` with an exiting handler for conditions of class"]
#[doc =
" `error`: on such a condition, `handler(cond, hdata)` runs after the"]
#[doc =
" unwind and its value is returned. Built on R\'s `tryCatch()`, so the"]
#[doc = " caller\'s handlers stay visible to `body` (wrap it in"]
#[doc = " [`R_ToplevelExec`] to hide them)."]
#[doc(alias = "tryCatchError")]
#[doc = "Unchecked FFI binding for `R_tryCatchError`."]
#[doc = "Generated from source location line 991, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_tryCatchError"]
pub(crate) fn R_tryCatchError_unchecked(body:
::std::option::Option<unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void)
-> SEXP>, bdata: *mut ::std::os::raw::c_void,
handler:
::std::option::Option<unsafe extern "C-unwind" fn(SEXP,
*mut ::std::os::raw::c_void) -> SEXP>,
hdata: *mut ::std::os::raw::c_void)
-> SEXP;
#[doc = "Unchecked FFI binding for `R_forceAndCall`."]
#[doc = "Generated from source location line 1001, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_forceAndCall"]
pub fn R_forceAndCall_unchecked(e: SEXP, n: ::std::os::raw::c_int,
rho: SEXP)
-> SEXP;
#[doc =
" Parse R source text into an EXPRSXP (a list of parsed expressions)."]
#[doc = ""]
#[doc =
" `text` is a STRSXP holding the source, `n` is the number of expressions"]
#[doc =
" to parse (`-1` for all), `status` receives the [`ParseStatus`] outcome,"]
#[doc =
" and `srcfile` is a srcref/`R_NilValue`. Allocates; protect the result."]
#[doc = ""]
#[doc =
" Prefer the safe [`crate::expression::r_eval_str`] wrapper, which does the"]
#[doc =
" STRSXP construction, status check, and protection bookkeeping for you."]
#[doc(alias = "ParseVector")]
#[doc = "Unchecked FFI binding for `R_ParseVector`."]
#[doc = "Generated from source location line 1012, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_ParseVector"]
pub fn R_ParseVector_unchecked(text: SEXP, n: ::std::os::raw::c_int,
status: *mut ParseStatus, srcfile: SEXP)
-> SEXP;
}
#[doc(alias = "asLogical")]
#[doc =
"Checked wrapper for `Rf_asLogical`. Calls `Rf_asLogical_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 824, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_asLogical(x: SEXP) -> ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_asLogical_unchecked(x)
})
});
result.0
}
#[doc(alias = "asInteger")]
#[doc =
"Checked wrapper for `Rf_asInteger`. Calls `Rf_asInteger_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 826, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_asInteger(x: SEXP) -> ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_asInteger_unchecked(x)
})
});
result.0
}
#[doc(alias = "asReal")]
#[doc =
"Checked wrapper for `Rf_asReal`. Calls `Rf_asReal_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 828, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_asReal(x: SEXP) -> f64 {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_asReal_unchecked(x)
})
});
result.0
}
#[doc(alias = "asChar")]
#[doc =
"Checked wrapper for `Rf_asChar`. Calls `Rf_asChar_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 830, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_asChar(x: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_asChar_unchecked(x)
})
});
result.0
}
#[doc(alias = "coerceVector")]
#[doc =
"Checked wrapper for `Rf_coerceVector`. Calls `Rf_coerceVector_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 832, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_coerceVector(v: SEXP, sexptype: SEXPTYPE) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_coerceVector_unchecked(v, sexptype)
})
});
result.0
}
#[doc(alias = "nrows")]
#[doc =
"Checked wrapper for `Rf_nrows`. Calls `Rf_nrows_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 836, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_nrows(x: SEXP) -> ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_nrows_unchecked(x)
})
});
result.0
}
#[doc(alias = "ncols")]
#[doc =
"Checked wrapper for `Rf_ncols`. Calls `Rf_ncols_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 838, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_ncols(x: SEXP) -> ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_ncols_unchecked(x)
})
});
result.0
}
#[doc(alias = "inherits")]
#[doc =
"Checked wrapper for `Rf_inherits`. Calls `Rf_inherits_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 842, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_inherits(x: SEXP, klass: *const ::std::os::raw::c_char)
-> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_inherits_unchecked(x, klass)
})
});
result.0
}
#[doc(alias = "isNull")]
#[doc =
"Checked wrapper for `Rf_isNull`. Calls `Rf_isNull_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 846, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isNull(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isNull_unchecked(s)
})
});
result.0
}
#[doc(alias = "isSymbol")]
#[doc =
"Checked wrapper for `Rf_isSymbol`. Calls `Rf_isSymbol_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 848, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isSymbol(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isSymbol_unchecked(s)
})
});
result.0
}
#[doc(alias = "isLogical")]
#[doc =
"Checked wrapper for `Rf_isLogical`. Calls `Rf_isLogical_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 850, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isLogical(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isLogical_unchecked(s)
})
});
result.0
}
#[doc(alias = "isReal")]
#[doc =
"Checked wrapper for `Rf_isReal`. Calls `Rf_isReal_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 852, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isReal(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isReal_unchecked(s)
})
});
result.0
}
#[doc(alias = "isComplex")]
#[doc =
"Checked wrapper for `Rf_isComplex`. Calls `Rf_isComplex_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 854, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isComplex(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isComplex_unchecked(s)
})
});
result.0
}
#[doc(alias = "isExpression")]
#[doc =
"Checked wrapper for `Rf_isExpression`. Calls `Rf_isExpression_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 856, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isExpression(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isExpression_unchecked(s)
})
});
result.0
}
#[doc(alias = "isEnvironment")]
#[doc =
"Checked wrapper for `Rf_isEnvironment`. Calls `Rf_isEnvironment_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 858, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isEnvironment(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isEnvironment_unchecked(s)
})
});
result.0
}
#[doc(alias = "isString")]
#[doc =
"Checked wrapper for `Rf_isString`. Calls `Rf_isString_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 860, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isString(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isString_unchecked(s)
})
});
result.0
}
#[doc(alias = "isArray")]
#[doc =
"Checked wrapper for `Rf_isArray`. Calls `Rf_isArray_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 864, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isArray(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isArray_unchecked(s)
})
});
result.0
}
#[doc(alias = "isMatrix")]
#[doc =
"Checked wrapper for `Rf_isMatrix`. Calls `Rf_isMatrix_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 866, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isMatrix(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isMatrix_unchecked(s)
})
});
result.0
}
#[doc(alias = "isList")]
#[doc =
"Checked wrapper for `Rf_isList`. Calls `Rf_isList_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 868, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isList(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isList_unchecked(s)
})
});
result.0
}
#[doc(alias = "isNewList")]
#[doc =
"Checked wrapper for `Rf_isNewList`. Calls `Rf_isNewList_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 870, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isNewList(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isNewList_unchecked(s)
})
});
result.0
}
#[doc(alias = "isPairList")]
#[doc =
"Checked wrapper for `Rf_isPairList`. Calls `Rf_isPairList_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 872, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isPairList(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isPairList_unchecked(s)
})
});
result.0
}
#[doc(alias = "isFunction")]
#[doc =
"Checked wrapper for `Rf_isFunction`. Calls `Rf_isFunction_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 874, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isFunction(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isFunction_unchecked(s)
})
});
result.0
}
#[doc(alias = "isPrimitive")]
#[doc =
"Checked wrapper for `Rf_isPrimitive`. Calls `Rf_isPrimitive_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 876, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isPrimitive(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isPrimitive_unchecked(s)
})
});
result.0
}
#[doc(alias = "isLanguage")]
#[doc =
"Checked wrapper for `Rf_isLanguage`. Calls `Rf_isLanguage_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 878, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isLanguage(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isLanguage_unchecked(s)
})
});
result.0
}
#[doc(alias = "isDataFrame")]
#[doc =
"Checked wrapper for `Rf_isDataFrame`. Calls `Rf_isDataFrame_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 880, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isDataFrame(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isDataFrame_unchecked(s)
})
});
result.0
}
#[doc(alias = "isFactor")]
#[doc =
"Checked wrapper for `Rf_isFactor`. Calls `Rf_isFactor_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 882, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isFactor(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isFactor_unchecked(s)
})
});
result.0
}
#[doc(alias = "isInteger")]
#[doc =
"Checked wrapper for `Rf_isInteger`. Calls `Rf_isInteger_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 884, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isInteger(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isInteger_unchecked(s)
})
});
result.0
}
#[doc(alias = "isObject")]
#[doc =
"Checked wrapper for `Rf_isObject`. Calls `Rf_isObject_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 886, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isObject(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isObject_unchecked(s)
})
});
result.0
}
#[doc(alias = "elt")]
#[doc =
"Checked wrapper for `Rf_elt`. Calls `Rf_elt_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 890, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_elt(list: SEXP, i: ::std::os::raw::c_int) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_elt_unchecked(list, i)
})
});
result.0
}
#[doc(alias = "lastElt")]
#[doc =
"Checked wrapper for `Rf_lastElt`. Calls `Rf_lastElt_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 892, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_lastElt(list: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_lastElt_unchecked(list)
})
});
result.0
}
#[doc(alias = "nthcdr")]
#[doc =
"Checked wrapper for `Rf_nthcdr`. Calls `Rf_nthcdr_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 894, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_nthcdr(list: SEXP, n: ::std::os::raw::c_int) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_nthcdr_unchecked(list, n)
})
});
result.0
}
#[doc(alias = "listAppend")]
#[doc =
"Checked wrapper for `Rf_listAppend`. Calls `Rf_listAppend_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 896, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_listAppend(s: SEXP, t: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_listAppend_unchecked(s, t)
})
});
result.0
}
#[doc = " Set the class attribute of a vector."]
#[doc = ""]
#[doc = " Equivalent to R\'s `class(vec) <- klass` syntax."]
#[doc = " The \"gets\" suffix indicates this is a setter function."]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc = " Returns the modified vector (like all \"*gets\" functions)."]
#[doc(alias = "classgets")]
#[doc =
"Checked wrapper for `Rf_classgets`. Calls `Rf_classgets_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 912, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_classgets(vec: SEXP, klass: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_classgets_unchecked(vec, klass)
})
});
result.0
}
#[doc = " Set the dimnames attribute of an array/matrix."]
#[doc = ""]
#[doc = " Equivalent to R\'s `dimnames(vec) <- val` syntax."]
#[doc = " The \"gets\" suffix indicates this is a setter function."]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc = " Returns the modified vector."]
#[doc(alias = "dimnamesgets")]
#[doc =
"Checked wrapper for `Rf_dimnamesgets`. Calls `Rf_dimnamesgets_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 923, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_dimnamesgets(vec: SEXP, val: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_dimnamesgets_unchecked(vec, val)
})
});
result.0
}
#[doc(alias = "GetRowNames")]
#[doc =
"Checked wrapper for `Rf_GetRowNames`. Calls `Rf_GetRowNames_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 926, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn Rf_GetRowNames(dimnames: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_GetRowNames_unchecked(dimnames)
})
});
result.0
}
#[doc(alias = "GetColNames")]
#[doc =
"Checked wrapper for `Rf_GetColNames`. Calls `Rf_GetColNames_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 928, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn Rf_GetColNames(dimnames: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_GetColNames_unchecked(dimnames)
})
});
result.0
}
#[doc =
" Single-frame (`inherits = FALSE`) or inherited variable lookup with an"]
#[doc = " `ifnotfound` default — the API-blessed replacement for"]
#[doc = " `Rf_findVarInFrame`. R 4.5.0 added it, so it is declared only when"]
#[doc = " building against R >= 4.5 (`r_4_5`, #1905); for R 4.4, evaluate"]
#[doc = " `base::get0()` instead."]
#[doc = " **Longjmps** if `rho` is not an environment or"]
#[doc = " the binding is `R_MissingArg`; forces promises."]
#[doc(alias = "getVarEx")]
#[doc =
"Checked wrapper for `R_getVarEx`. Calls `R_getVarEx_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 940, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_getVarEx(sym: SEXP, rho: SEXP, inherits: Rboolean,
ifnotfound: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_getVarEx_unchecked(sym, rho, inherits, ifnotfound)
})
});
result.0
}
#[doc(alias = "defineVar")]
#[doc =
"Checked wrapper for `Rf_defineVar`. Calls `Rf_defineVar_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 942, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_defineVar(symbol: SEXP, value: SEXP, rho: SEXP) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_defineVar_unchecked(symbol, value, rho)
})
});
result.0
}
#[doc(alias = "setVar")]
#[doc =
"Checked wrapper for `Rf_setVar`. Calls `Rf_setVar_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 944, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_setVar(symbol: SEXP, value: SEXP, rho: SEXP) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_setVar_unchecked(symbol, value, rho)
})
});
result.0
}
#[doc(alias = "findFun")]
#[doc =
"Checked wrapper for `Rf_findFun`. Calls `Rf_findFun_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 946, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_findFun(symbol: SEXP, rho: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_findFun_unchecked(symbol, rho)
})
});
result.0
}
#[doc =
" Find a registered namespace by name. **Longjmps on error** — prefer"]
#[doc = " `REnv::package_namespace()` which wraps this safely."]
#[doc(alias = "FindNamespace")]
#[doc =
"Checked wrapper for `R_FindNamespace`. Calls `R_FindNamespace_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 951, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_FindNamespace(info: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_FindNamespace_unchecked(info)
})
});
result.0
}
#[doc =
" Return the current execution environment (innermost closure on call"]
#[doc = " stack, or `R_GlobalEnv` if none)."]
#[doc(alias = "GetCurrentEnv")]
#[doc =
"Checked wrapper for `R_GetCurrentEnv`. Calls `R_GetCurrentEnv_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 957, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_GetCurrentEnv() -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_GetCurrentEnv_unchecked()
})
});
result.0
}
#[doc(alias = "eval")]
#[doc =
"Checked wrapper for `Rf_eval`. Calls `Rf_eval_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 961, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_eval(expr: SEXP, rho: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_eval_unchecked(expr, rho)
})
});
result.0
}
#[doc(alias = "applyClosure")]
#[doc =
"Checked wrapper for `Rf_applyClosure`. Calls `Rf_applyClosure_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 963, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_applyClosure(call: SEXP, op: SEXP, args: SEXP, rho: SEXP,
suppliedvars: SEXP, check: Rboolean) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_applyClosure_unchecked(call, op, args, rho, suppliedvars,
check)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_tryEval`. Calls `R_tryEval_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 971, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_tryEval(expr: SEXP, env: SEXP,
error_occurred: *mut ::std::os::raw::c_int) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_tryEval_unchecked(expr, env, error_occurred)
})
});
result.0
}
#[doc =
" Run `fun(data)` in a new top-level context: the caller\'s condition"]
#[doc = " handlers and restarts are hidden from it, and any jump out of it"]
#[doc = " (an unhandled error, an interrupt, an `abort` restart) stops here."]
#[doc = " `TRUE` when `fun` returned, `FALSE` after such a jump."]
#[doc(alias = "ToplevelExec")]
#[doc =
"Checked wrapper for `R_ToplevelExec`. Calls `R_ToplevelExec_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 981, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_ToplevelExec(fun:
::std::option::Option<unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void)>,
data: *mut ::std::os::raw::c_void) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_ToplevelExec_unchecked(fun, data)
})
});
result.0
}
#[doc = " Call `body(bdata)` with an exiting handler for conditions of class"]
#[doc =
" `error`: on such a condition, `handler(cond, hdata)` runs after the"]
#[doc =
" unwind and its value is returned. Built on R\'s `tryCatch()`, so the"]
#[doc = " caller\'s handlers stay visible to `body` (wrap it in"]
#[doc = " [`R_ToplevelExec`] to hide them)."]
#[doc(alias = "tryCatchError")]
#[doc =
"Checked wrapper for `R_tryCatchError`. Calls `R_tryCatchError_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 991, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_tryCatchError(body:
::std::option::Option<unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void)
-> SEXP>, bdata: *mut ::std::os::raw::c_void,
handler:
::std::option::Option<unsafe extern "C-unwind" fn(SEXP,
*mut ::std::os::raw::c_void) -> SEXP>,
hdata: *mut ::std::os::raw::c_void) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_tryCatchError_unchecked(body, bdata, handler, hdata)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_forceAndCall`. Calls `R_forceAndCall_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 1001, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_forceAndCall(e: SEXP, n: ::std::os::raw::c_int, rho: SEXP)
-> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_forceAndCall_unchecked(e, n, rho)
})
});
result.0
}
#[doc =
" Parse R source text into an EXPRSXP (a list of parsed expressions)."]
#[doc = ""]
#[doc =
" `text` is a STRSXP holding the source, `n` is the number of expressions"]
#[doc =
" to parse (`-1` for all), `status` receives the [`ParseStatus`] outcome,"]
#[doc =
" and `srcfile` is a srcref/`R_NilValue`. Allocates; protect the result."]
#[doc = ""]
#[doc =
" Prefer the safe [`crate::expression::r_eval_str`] wrapper, which does the"]
#[doc =
" STRSXP construction, status check, and protection bookkeeping for you."]
#[doc(alias = "ParseVector")]
#[doc =
"Checked wrapper for `R_ParseVector`. Calls `R_ParseVector_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 1012, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_ParseVector(text: SEXP, n: ::std::os::raw::c_int,
status: *mut ParseStatus, srcfile: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_ParseVector_unchecked(text, n, status, srcfile)
})
});
result.0
}#[r_ffi_checked]
821unsafe extern "C-unwind" {
822 #[doc(alias = "asLogical")]
824 pub fn Rf_asLogical(x: SEXP) -> ::std::os::raw::c_int;
825 #[doc(alias = "asInteger")]
826 pub fn Rf_asInteger(x: SEXP) -> ::std::os::raw::c_int;
827 #[doc(alias = "asReal")]
828 pub fn Rf_asReal(x: SEXP) -> f64;
829 #[doc(alias = "asChar")]
830 pub fn Rf_asChar(x: SEXP) -> SEXP;
831 #[doc(alias = "coerceVector")]
832 pub fn Rf_coerceVector(v: SEXP, sexptype: SEXPTYPE) -> SEXP;
833
834 #[doc(alias = "nrows")]
836 pub fn Rf_nrows(x: SEXP) -> ::std::os::raw::c_int;
837 #[doc(alias = "ncols")]
838 pub fn Rf_ncols(x: SEXP) -> ::std::os::raw::c_int;
839
840 #[doc(alias = "inherits")]
842 pub fn Rf_inherits(x: SEXP, klass: *const ::std::os::raw::c_char) -> Rboolean;
843
844 #[doc(alias = "isNull")]
846 pub fn Rf_isNull(s: SEXP) -> Rboolean;
847 #[doc(alias = "isSymbol")]
848 pub fn Rf_isSymbol(s: SEXP) -> Rboolean;
849 #[doc(alias = "isLogical")]
850 pub fn Rf_isLogical(s: SEXP) -> Rboolean;
851 #[doc(alias = "isReal")]
852 pub fn Rf_isReal(s: SEXP) -> Rboolean;
853 #[doc(alias = "isComplex")]
854 pub fn Rf_isComplex(s: SEXP) -> Rboolean;
855 #[doc(alias = "isExpression")]
856 pub fn Rf_isExpression(s: SEXP) -> Rboolean;
857 #[doc(alias = "isEnvironment")]
858 pub fn Rf_isEnvironment(s: SEXP) -> Rboolean;
859 #[doc(alias = "isString")]
860 pub fn Rf_isString(s: SEXP) -> Rboolean;
861
862 #[doc(alias = "isArray")]
864 pub fn Rf_isArray(s: SEXP) -> Rboolean;
865 #[doc(alias = "isMatrix")]
866 pub fn Rf_isMatrix(s: SEXP) -> Rboolean;
867 #[doc(alias = "isList")]
868 pub fn Rf_isList(s: SEXP) -> Rboolean;
869 #[doc(alias = "isNewList")]
870 pub fn Rf_isNewList(s: SEXP) -> Rboolean;
871 #[doc(alias = "isPairList")]
872 pub fn Rf_isPairList(s: SEXP) -> Rboolean;
873 #[doc(alias = "isFunction")]
874 pub fn Rf_isFunction(s: SEXP) -> Rboolean;
875 #[doc(alias = "isPrimitive")]
876 pub fn Rf_isPrimitive(s: SEXP) -> Rboolean;
877 #[doc(alias = "isLanguage")]
878 pub fn Rf_isLanguage(s: SEXP) -> Rboolean;
879 #[doc(alias = "isDataFrame")]
880 pub fn Rf_isDataFrame(s: SEXP) -> Rboolean;
881 #[doc(alias = "isFactor")]
882 pub fn Rf_isFactor(s: SEXP) -> Rboolean;
883 #[doc(alias = "isInteger")]
884 pub fn Rf_isInteger(s: SEXP) -> Rboolean;
885 #[doc(alias = "isObject")]
886 pub fn Rf_isObject(s: SEXP) -> Rboolean;
887
888 #[doc(alias = "elt")]
890 pub fn Rf_elt(list: SEXP, i: ::std::os::raw::c_int) -> SEXP;
891 #[doc(alias = "lastElt")]
892 pub fn Rf_lastElt(list: SEXP) -> SEXP;
893 #[doc(alias = "nthcdr")]
894 pub fn Rf_nthcdr(list: SEXP, n: ::std::os::raw::c_int) -> SEXP;
895 #[doc(alias = "listAppend")]
896 pub fn Rf_listAppend(s: SEXP, t: SEXP) -> SEXP;
897
898 #[doc(alias = "classgets")]
912 pub fn Rf_classgets(vec: SEXP, klass: SEXP) -> SEXP;
913
914 #[doc(alias = "dimnamesgets")]
923 pub fn Rf_dimnamesgets(vec: SEXP, val: SEXP) -> SEXP;
924 #[doc(alias = "GetRowNames")]
926 pub(crate) fn Rf_GetRowNames(dimnames: SEXP) -> SEXP;
927 #[doc(alias = "GetColNames")]
928 pub(crate) fn Rf_GetColNames(dimnames: SEXP) -> SEXP;
929
930 #[cfg(r_4_5)]
939 #[doc(alias = "getVarEx")]
940 pub fn R_getVarEx(sym: SEXP, rho: SEXP, inherits: Rboolean, ifnotfound: SEXP) -> SEXP;
941 #[doc(alias = "defineVar")]
942 pub fn Rf_defineVar(symbol: SEXP, value: SEXP, rho: SEXP);
943 #[doc(alias = "setVar")]
944 pub fn Rf_setVar(symbol: SEXP, value: SEXP, rho: SEXP);
945 #[doc(alias = "findFun")]
946 pub fn Rf_findFun(symbol: SEXP, rho: SEXP) -> SEXP;
947
948 #[doc(alias = "FindNamespace")]
951 pub fn R_FindNamespace(info: SEXP) -> SEXP;
952
953 #[doc(alias = "GetCurrentEnv")]
957 pub(crate) fn R_GetCurrentEnv() -> SEXP;
958
959 #[doc(alias = "eval")]
961 pub fn Rf_eval(expr: SEXP, rho: SEXP) -> SEXP;
962 #[doc(alias = "applyClosure")]
963 pub fn Rf_applyClosure(
964 call: SEXP,
965 op: SEXP,
966 args: SEXP,
967 rho: SEXP,
968 suppliedvars: SEXP,
969 check: Rboolean,
970 ) -> SEXP;
971 pub fn R_tryEval(expr: SEXP, env: SEXP, error_occurred: *mut ::std::os::raw::c_int) -> SEXP;
972 #[doc(alias = "ToplevelExec")]
981 pub(crate) fn R_ToplevelExec(
982 fun: ::std::option::Option<unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void)>,
983 data: *mut ::std::os::raw::c_void,
984 ) -> Rboolean;
985 #[doc(alias = "tryCatchError")]
991 pub(crate) fn R_tryCatchError(
992 body: ::std::option::Option<
993 unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void) -> SEXP,
994 >,
995 bdata: *mut ::std::os::raw::c_void,
996 handler: ::std::option::Option<
997 unsafe extern "C-unwind" fn(SEXP, *mut ::std::os::raw::c_void) -> SEXP,
998 >,
999 hdata: *mut ::std::os::raw::c_void,
1000 ) -> SEXP;
1001 pub fn R_forceAndCall(e: SEXP, n: ::std::os::raw::c_int, rho: SEXP) -> SEXP;
1002
1003 #[doc(alias = "ParseVector")]
1012 pub fn R_ParseVector(
1013 text: SEXP,
1014 n: ::std::os::raw::c_int,
1015 status: *mut ParseStatus,
1016 srcfile: SEXP,
1017 ) -> SEXP;
1018}
1019
1020#[allow(non_camel_case_types)]
1027#[repr(i32)]
1028#[derive(#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::fmt::Debug for ParseStatus {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
ParseStatus::PARSE_NULL => "PARSE_NULL",
ParseStatus::PARSE_OK => "PARSE_OK",
ParseStatus::PARSE_INCOMPLETE => "PARSE_INCOMPLETE",
ParseStatus::PARSE_ERROR => "PARSE_ERROR",
ParseStatus::PARSE_EOF => "PARSE_EOF",
})
}
}Debug, #[automatically_derived]
#[doc(hidden)]
#[allow(non_camel_case_types)]
unsafe impl ::core::clone::TrivialClone for ParseStatus { }
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::clone::Clone for ParseStatus {
#[inline]
fn clone(&self) -> Self { *self }
}Clone, #[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::marker::Copy for ParseStatus { }Copy, #[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::marker::StructuralPartialEq for ParseStatus { }
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::cmp::PartialEq for ParseStatus {
#[inline]
fn eq(&self, other: &Self) -> bool {
::core::intrinsics::discriminant_value(self) ==
::core::intrinsics::discriminant_value(other)
}
}PartialEq, #[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::cmp::Eq for ParseStatus { }Eq)]
1029pub enum ParseStatus {
1030 PARSE_NULL,
1032 PARSE_OK,
1034 PARSE_INCOMPLETE,
1036 PARSE_ERROR,
1038 PARSE_EOF,
1040}
1041
1042#[r_ffi_checked]
1056#[cfg(feature = "connections")]
1057unsafe extern "C-unwind" {
1058 pub(crate) fn R_new_custom_connection(
1070 description: *const ::std::os::raw::c_char,
1071 mode: *const ::std::os::raw::c_char,
1072 class_name: *const ::std::os::raw::c_char,
1073 ptr: *mut Rconnection,
1074 ) -> SEXP;
1075
1076 pub(crate) fn R_ReadConnection(
1087 con: Rconnection,
1088 buf: *mut ::std::os::raw::c_void,
1089 n: usize,
1090 ) -> usize;
1091
1092 pub(crate) fn R_WriteConnection(
1103 con: Rconnection,
1104 buf: *const ::std::os::raw::c_void,
1105 n: usize,
1106 ) -> usize;
1107
1108 pub(crate) fn R_GetConnection(sConn: SEXP) -> Rconnection;
1119}
1120#[allow(non_snake_case)]
1128pub unsafe fn Rf_isS4(arg1: SEXP) -> Rboolean {
1129 unsafe extern "C-unwind" {
1130 #[link_name = "Rf_isS4"]
1131 pub fn Rf_isS4_original(arg1: SEXP) -> u32;
1132 }
1133
1134 unsafe {
1135 if Rf_isS4_original(arg1) == 0 {
1136 Rboolean::FALSE
1137 } else {
1138 Rboolean::TRUE
1139 }
1140 }
1141}
1142
1143#[repr(C)]
1146#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DllInfo {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_tuple_field1_finish(f, "DllInfo",
&&self.0)
}
}Debug)]
1147pub struct DllInfo(::std::os::raw::c_void);
1149
1150#[allow(non_camel_case_types)]
1160pub type DL_FUNC =
1161 ::std::option::Option<unsafe extern "C-unwind" fn() -> *mut ::std::os::raw::c_void>;
1162
1163#[allow(non_camel_case_types)]
1168pub type R_NativePrimitiveArgType = ::std::os::raw::c_uint;
1169
1170#[repr(C)]
1174#[derive(#[automatically_derived]
#[allow(non_camel_case_types)]
#[allow(non_snake_case)]
impl ::core::fmt::Debug for R_CMethodDef {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field4_finish(f, "R_CMethodDef",
"name", &self.name, "fun", &self.fun, "numArgs", &self.numArgs,
"types", &&self.types)
}
}Debug, #[automatically_derived]
#[allow(non_camel_case_types)]
#[allow(non_snake_case)]
impl ::core::marker::Copy for R_CMethodDef { }Copy, #[automatically_derived]
#[doc(hidden)]
#[allow(non_camel_case_types)]
#[allow(non_snake_case)]
unsafe impl ::core::clone::TrivialClone for R_CMethodDef { }
#[automatically_derived]
#[allow(non_camel_case_types)]
#[allow(non_snake_case)]
impl ::core::clone::Clone for R_CMethodDef {
#[inline]
fn clone(&self) -> Self {
let _:
::core::clone::AssertParamIsClone<*const ::std::os::raw::c_char>;
let _: ::core::clone::AssertParamIsClone<DL_FUNC>;
let _: ::core::clone::AssertParamIsClone<::std::os::raw::c_int>;
let _:
::core::clone::AssertParamIsClone<*const R_NativePrimitiveArgType>;
*self
}
}Clone)]
1175#[allow(non_camel_case_types)]
1176#[allow(non_snake_case)]
1177pub struct R_CMethodDef {
1178 pub name: *const ::std::os::raw::c_char,
1180 pub fun: DL_FUNC,
1182 pub numArgs: ::std::os::raw::c_int,
1184 pub types: *const R_NativePrimitiveArgType,
1186}
1187
1188#[allow(non_camel_case_types)]
1192pub type R_FortranMethodDef = R_CMethodDef;
1193
1194#[repr(C)]
1199#[derive(#[automatically_derived]
#[allow(non_camel_case_types)]
#[allow(non_snake_case)]
impl ::core::fmt::Debug for R_CallMethodDef {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field3_finish(f,
"R_CallMethodDef", "name", &self.name, "fun", &self.fun,
"numArgs", &&self.numArgs)
}
}Debug, #[automatically_derived]
#[allow(non_camel_case_types)]
#[allow(non_snake_case)]
impl ::core::marker::Copy for R_CallMethodDef { }Copy, #[automatically_derived]
#[doc(hidden)]
#[allow(non_camel_case_types)]
#[allow(non_snake_case)]
unsafe impl ::core::clone::TrivialClone for R_CallMethodDef { }
#[automatically_derived]
#[allow(non_camel_case_types)]
#[allow(non_snake_case)]
impl ::core::clone::Clone for R_CallMethodDef {
#[inline]
fn clone(&self) -> Self {
let _:
::core::clone::AssertParamIsClone<*const ::std::os::raw::c_char>;
let _: ::core::clone::AssertParamIsClone<DL_FUNC>;
let _: ::core::clone::AssertParamIsClone<::std::os::raw::c_int>;
*self
}
}Clone)]
1200#[allow(non_camel_case_types)]
1201#[allow(non_snake_case)]
1202pub struct R_CallMethodDef {
1203 pub name: *const ::std::os::raw::c_char,
1205 pub fun: DL_FUNC,
1207 pub numArgs: ::std::os::raw::c_int,
1209}
1210
1211unsafe impl Sync for R_CallMethodDef {}
1214unsafe impl Send for R_CallMethodDef {}
1215
1216#[allow(non_camel_case_types)]
1220pub type R_ExternalMethodDef = R_CallMethodDef;
1221
1222#[allow(missing_docs)]
1225#[allow(missing_docs)]
#[allow(clashing_extern_declarations)]
unsafe extern "C-unwind" {
#[doc = "Unchecked FFI binding for `R_registerRoutines`."]
#[doc = "Generated from source location line 1228, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_registerRoutines"]
pub(crate) fn R_registerRoutines_unchecked(info: *mut DllInfo,
croutines: *const R_CMethodDef, callRoutines: *const R_CallMethodDef,
fortranRoutines: *const R_FortranMethodDef,
externalRoutines: *const R_ExternalMethodDef)
-> ::std::os::raw::c_int;
#[doc = "Unchecked FFI binding for `R_useDynamicSymbols`."]
#[doc = "Generated from source location line 1236, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_useDynamicSymbols"]
pub(crate) fn R_useDynamicSymbols_unchecked(info: *mut DllInfo,
value: Rboolean)
-> Rboolean;
#[doc = "Unchecked FFI binding for `R_forceSymbols`."]
#[doc = "Generated from source location line 1237, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_forceSymbols"]
pub(crate) fn R_forceSymbols_unchecked(info: *mut DllInfo,
value: Rboolean)
-> Rboolean;
}
#[doc =
"Checked wrapper for `R_registerRoutines`. Calls `R_registerRoutines_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 1228, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_registerRoutines(info: *mut DllInfo,
croutines: *const R_CMethodDef, callRoutines: *const R_CallMethodDef,
fortranRoutines: *const R_FortranMethodDef,
externalRoutines: *const R_ExternalMethodDef) -> ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_registerRoutines_unchecked(info, croutines, callRoutines,
fortranRoutines, externalRoutines)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_useDynamicSymbols`. Calls `R_useDynamicSymbols_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 1236, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_useDynamicSymbols(info: *mut DllInfo, value: Rboolean)
-> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_useDynamicSymbols_unchecked(info, value)
})
});
result.0
}
#[doc =
"Checked wrapper for `R_forceSymbols`. Calls `R_forceSymbols_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 1237, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_forceSymbols(info: *mut DllInfo, value: Rboolean)
-> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_forceSymbols_unchecked(info, value)
})
});
result.0
}#[r_ffi_checked]
1226#[allow(clashing_extern_declarations)]
1227unsafe extern "C-unwind" {
1228 pub(crate) fn R_registerRoutines(
1229 info: *mut DllInfo,
1230 croutines: *const R_CMethodDef,
1231 callRoutines: *const R_CallMethodDef,
1232 fortranRoutines: *const R_FortranMethodDef,
1233 externalRoutines: *const R_ExternalMethodDef,
1234 ) -> ::std::os::raw::c_int;
1235
1236 pub(crate) fn R_useDynamicSymbols(info: *mut DllInfo, value: Rboolean) -> Rboolean;
1237 pub(crate) fn R_forceSymbols(info: *mut DllInfo, value: Rboolean) -> Rboolean;
1238}
1239
1240#[cfg(feature = "nonapi")]
1258pub mod nonapi_encoding {
1259 use super::r_ffi_checked;
1260
1261 #[r_ffi_checked]
1263 #[allow(clashing_extern_declarations)]
1264 unsafe extern "C-unwind" {
1265 pub(crate) static utf8locale: super::Rboolean;
1267 pub(crate) static mbcslocale: super::Rboolean;
1268 pub(crate) static known_to_be_latin1: super::Rboolean;
1269 }
1270}
1271
1272#[cfg(feature = "nonapi")]
1290pub mod nonapi_stack {
1291 unsafe extern "C" {
1292 #[allow(non_upper_case_globals)]
1297 pub(crate) static R_CStackStart: usize;
1298
1299 #[allow(non_upper_case_globals)]
1303 pub static R_CStackLimit: usize;
1304
1305 #[allow(non_upper_case_globals)]
1309 pub(crate) static R_CStackDir: ::std::os::raw::c_int;
1310 }
1311
1312 #[inline]
1317 pub unsafe fn set_r_cstack_limit(value: usize) {
1318 unsafe {
1319 let ptr = (&raw const R_CStackLimit).cast_mut();
1320 ptr.write(value);
1321 }
1322 }
1323
1324 #[inline]
1327 pub(crate) fn get_r_cstack_limit() -> usize {
1328 unsafe { R_CStackLimit }
1329 }
1330
1331 #[inline]
1333 pub(crate) fn get_r_cstack_start() -> usize {
1334 unsafe { R_CStackStart }
1335 }
1336
1337 #[inline]
1339 pub(crate) fn get_r_cstack_dir() -> ::std::os::raw::c_int {
1340 unsafe { R_CStackDir }
1341 }
1342}
1343
1344#[doc(alias = "mkString")]
1359#[allow(non_snake_case)]
1360#[inline]
1361pub unsafe fn Rf_mkString(s: *const ::std::os::raw::c_char) -> SEXP {
1362 unsafe {
1363 let charsxp = Rf_mkChar(s);
1364 let protected = Rf_protect(charsxp);
1365 let result = Rf_ScalarString(protected);
1366 Rf_unprotect(1);
1367 result
1368 }
1369}
1370
1371#[doc(alias = "list1")]
1381#[allow(non_snake_case)]
1382#[inline]
1383pub unsafe fn Rf_list1(s: SEXP) -> SEXP {
1384 unsafe { Rf_cons(s, R_NilValue) }
1385}
1386
1387#[doc(alias = "list2")]
1397#[allow(non_snake_case)]
1398#[inline]
1399pub unsafe fn Rf_list2(s: SEXP, t: SEXP) -> SEXP {
1400 unsafe { Rf_cons(s, Rf_cons(t, R_NilValue)) }
1401}
1402
1403#[doc(alias = "list3")]
1413#[allow(non_snake_case)]
1414#[inline]
1415pub unsafe fn Rf_list3(s: SEXP, t: SEXP, u: SEXP) -> SEXP {
1416 unsafe { Rf_cons(s, Rf_cons(t, Rf_cons(u, R_NilValue))) }
1417}
1418
1419#[doc(alias = "list4")]
1429#[allow(non_snake_case)]
1430#[inline]
1431pub unsafe fn Rf_list4(s: SEXP, t: SEXP, u: SEXP, v: SEXP) -> SEXP {
1432 unsafe { Rf_cons(s, Rf_cons(t, Rf_cons(u, Rf_cons(v, R_NilValue)))) }
1433}
1434
1435#[doc(alias = "lang1")]
1446#[allow(non_snake_case)]
1447#[inline]
1448pub unsafe fn Rf_lang1(s: SEXP) -> SEXP {
1449 unsafe { Rf_lcons(s, R_NilValue) }
1450}
1451
1452#[doc(alias = "lang2")]
1463#[allow(non_snake_case)]
1464#[inline]
1465pub unsafe fn Rf_lang2(s: SEXP, t: SEXP) -> SEXP {
1466 unsafe { Rf_lcons(s, Rf_list1(t)) }
1467}
1468
1469#[doc(alias = "lang3")]
1480#[allow(non_snake_case)]
1481#[inline]
1482pub unsafe fn Rf_lang3(s: SEXP, t: SEXP, u: SEXP) -> SEXP {
1483 unsafe { Rf_lcons(s, Rf_list2(t, u)) }
1484}
1485
1486#[doc(alias = "lang4")]
1497#[allow(non_snake_case)]
1498#[inline]
1499pub unsafe fn Rf_lang4(s: SEXP, t: SEXP, u: SEXP, v: SEXP) -> SEXP {
1500 unsafe { Rf_lcons(s, Rf_list3(t, u, v)) }
1501}
1502
1503#[doc(alias = "lang5")]
1514#[allow(non_snake_case)]
1515#[inline]
1516pub unsafe fn Rf_lang5(s: SEXP, t: SEXP, u: SEXP, v: SEXP, w: SEXP) -> SEXP {
1517 unsafe { Rf_lcons(s, Rf_list4(t, u, v, w)) }
1518}
1519
1520#[doc(alias = "lang6")]
1531#[allow(non_snake_case)]
1532#[inline]
1533pub unsafe fn Rf_lang6(s: SEXP, t: SEXP, u: SEXP, v: SEXP, w: SEXP, x: SEXP) -> SEXP {
1534 unsafe {
1535 let protected = Rf_protect(s);
1536 let list = Rf_cons(t, Rf_list4(u, v, w, x));
1537 let result = Rf_lcons(protected, list);
1538 Rf_unprotect(1);
1539 result
1540 }
1541}
1542
1543#[repr(u32)]
1549#[non_exhaustive]
1550#[derive(#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::fmt::Debug for RNGtype {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
RNGtype::WICHMANN_HILL => "WICHMANN_HILL",
RNGtype::MARSAGLIA_MULTICARRY => "MARSAGLIA_MULTICARRY",
RNGtype::SUPER_DUPER => "SUPER_DUPER",
RNGtype::MERSENNE_TWISTER => "MERSENNE_TWISTER",
RNGtype::KNUTH_TAOCP => "KNUTH_TAOCP",
RNGtype::USER_UNIF => "USER_UNIF",
RNGtype::KNUTH_TAOCP2 => "KNUTH_TAOCP2",
RNGtype::LECUYER_CMRG => "LECUYER_CMRG",
})
}
}Debug, #[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::marker::Copy for RNGtype { }Copy, #[automatically_derived]
#[doc(hidden)]
#[allow(non_camel_case_types)]
unsafe impl ::core::clone::TrivialClone for RNGtype { }
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::clone::Clone for RNGtype {
#[inline]
fn clone(&self) -> Self { *self }
}Clone, #[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::hash::Hash for RNGtype {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&::core::intrinsics::discriminant_value(self),
state)
}
}Hash, #[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::marker::StructuralPartialEq for RNGtype { }
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::cmp::PartialEq for RNGtype {
#[inline]
fn eq(&self, other: &Self) -> bool {
::core::intrinsics::discriminant_value(self) ==
::core::intrinsics::discriminant_value(other)
}
}PartialEq, #[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::cmp::Eq for RNGtype { }Eq)]
1551#[allow(non_camel_case_types)]
1552pub enum RNGtype {
1553 WICHMANN_HILL = 0,
1555 MARSAGLIA_MULTICARRY = 1,
1557 SUPER_DUPER = 2,
1559 MERSENNE_TWISTER = 3,
1561 KNUTH_TAOCP = 4,
1563 USER_UNIF = 5,
1565 KNUTH_TAOCP2 = 6,
1567 LECUYER_CMRG = 7,
1569}
1570
1571#[repr(u32)]
1573#[non_exhaustive]
1574#[derive(#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::fmt::Debug for N01type {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
N01type::BUGGY_KINDERMAN_RAMAGE => "BUGGY_KINDERMAN_RAMAGE",
N01type::AHRENS_DIETER => "AHRENS_DIETER",
N01type::BOX_MULLER => "BOX_MULLER",
N01type::USER_NORM => "USER_NORM",
N01type::INVERSION => "INVERSION",
N01type::KINDERMAN_RAMAGE => "KINDERMAN_RAMAGE",
})
}
}Debug, #[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::marker::Copy for N01type { }Copy, #[automatically_derived]
#[doc(hidden)]
#[allow(non_camel_case_types)]
unsafe impl ::core::clone::TrivialClone for N01type { }
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::clone::Clone for N01type {
#[inline]
fn clone(&self) -> Self { *self }
}Clone, #[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::hash::Hash for N01type {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&::core::intrinsics::discriminant_value(self),
state)
}
}Hash, #[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::marker::StructuralPartialEq for N01type { }
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::cmp::PartialEq for N01type {
#[inline]
fn eq(&self, other: &Self) -> bool {
::core::intrinsics::discriminant_value(self) ==
::core::intrinsics::discriminant_value(other)
}
}PartialEq, #[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::cmp::Eq for N01type { }Eq)]
1575#[allow(non_camel_case_types)]
1576pub enum N01type {
1577 BUGGY_KINDERMAN_RAMAGE = 0,
1579 AHRENS_DIETER = 1,
1581 BOX_MULLER = 2,
1583 USER_NORM = 3,
1585 INVERSION = 4,
1587 KINDERMAN_RAMAGE = 5,
1589}
1590
1591#[repr(u32)]
1593#[non_exhaustive]
1594#[derive(#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::fmt::Debug for Sampletype {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
Sampletype::ROUNDING => "ROUNDING",
Sampletype::REJECTION => "REJECTION",
})
}
}Debug, #[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::marker::Copy for Sampletype { }Copy, #[automatically_derived]
#[doc(hidden)]
#[allow(non_camel_case_types)]
unsafe impl ::core::clone::TrivialClone for Sampletype { }
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::clone::Clone for Sampletype {
#[inline]
fn clone(&self) -> Self { *self }
}Clone, #[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::hash::Hash for Sampletype {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&::core::intrinsics::discriminant_value(self),
state)
}
}Hash, #[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::marker::StructuralPartialEq for Sampletype { }
#[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::cmp::PartialEq for Sampletype {
#[inline]
fn eq(&self, other: &Self) -> bool {
::core::intrinsics::discriminant_value(self) ==
::core::intrinsics::discriminant_value(other)
}
}PartialEq, #[automatically_derived]
#[allow(non_camel_case_types)]
impl ::core::cmp::Eq for Sampletype { }Eq)]
1595#[allow(non_camel_case_types)]
1596pub enum Sampletype {
1597 ROUNDING = 0,
1599 REJECTION = 1,
1601}
1602
1603unsafe extern "C-unwind" {
#[doc = " Save the current RNG state from R\'s global state."]
#[doc = ""]
#[doc = " Must be called before using `unif_rand()`, `norm_rand()`, etc."]
#[doc = " The state is restored with `PutRNGstate()`. The safe forms are"]
#[doc =
" [`RngGuard`](crate::rng::RngGuard), [`with_rng`](crate::rng::with_rng)"]
#[doc = " and `#[miniextendr(rng)]`."]
#[doc = ""]
#[doc = " # Example"]
#[doc = ""]
#[doc = " ```ignore"]
#[doc = " unsafe {"]
#[doc = " GetRNGstate();"]
#[doc = " let x = unif_rand();"]
#[doc = " let y = norm_rand();"]
#[doc = " PutRNGstate();"]
#[doc = " }"]
#[doc = " ```"]
#[doc = "Unchecked FFI binding for `GetRNGstate`."]
#[doc = "Generated from source location line 1622, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "GetRNGstate"]
pub fn GetRNGstate_unchecked();
#[doc = " Restore the RNG state to R\'s global state."]
#[doc = ""]
#[doc = " Must be called after using `unif_rand()`, `norm_rand()`, etc."]
#[doc = " to ensure R\'s `.Random.seed` is updated."]
#[doc = "Unchecked FFI binding for `PutRNGstate`."]
#[doc = "Generated from source location line 1628, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "PutRNGstate"]
pub fn PutRNGstate_unchecked();
#[doc = " Generate a uniform random number in (0, 1)."]
#[doc = ""]
#[doc = " # Important"]
#[doc = ""]
#[doc =
" Must call `GetRNGstate()` before and `PutRNGstate()` after. The safe"]
#[doc =
" form is [`RngGuard::unif_rand`](crate::rng::RngGuard::unif_rand)."]
#[doc = "Unchecked FFI binding for `unif_rand`."]
#[doc = "Generated from source location line 1636, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "unif_rand"]
pub fn unif_rand_unchecked()
-> f64;
#[doc = " Generate a standard normal random number (mean 0, sd 1)."]
#[doc = ""]
#[doc = " # Important"]
#[doc = ""]
#[doc =
" Must call `GetRNGstate()` before and `PutRNGstate()` after. The safe"]
#[doc =
" form is [`RngGuard::norm_rand`](crate::rng::RngGuard::norm_rand)."]
#[doc = "Unchecked FFI binding for `norm_rand`."]
#[doc = "Generated from source location line 1644, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "norm_rand"]
pub fn norm_rand_unchecked()
-> f64;
#[doc = " Generate an exponential random number with rate 1."]
#[doc = ""]
#[doc = " # Important"]
#[doc = ""]
#[doc =
" Must call `GetRNGstate()` before and `PutRNGstate()` after. The safe"]
#[doc =
" form is [`RngGuard::exp_rand`](crate::rng::RngGuard::exp_rand)."]
#[doc = "Unchecked FFI binding for `exp_rand`."]
#[doc = "Generated from source location line 1652, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "exp_rand"]
pub fn exp_rand_unchecked()
-> f64;
#[doc = " Generate a uniform random index in [0, dn)."]
#[doc = ""]
#[doc = " Used for sampling without bias for large n."]
#[doc = ""]
#[doc = " # Important"]
#[doc = ""]
#[doc =
" Must call `GetRNGstate()` before and `PutRNGstate()` after. The safe"]
#[doc =
" form is [`RngGuard::unif_index`](crate::rng::RngGuard::unif_index)."]
#[doc = "Unchecked FFI binding for `R_unif_index`."]
#[doc = "Generated from source location line 1662, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_unif_index"]
pub fn R_unif_index_unchecked(dn: f64)
-> f64;
#[doc = " Get the current discrete uniform sample method."]
#[doc = "Unchecked FFI binding for `R_sample_kind`."]
#[doc = "Generated from source location line 1665, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_sample_kind"]
pub fn R_sample_kind_unchecked()
-> Sampletype;
}
#[doc = " Save the current RNG state from R\'s global state."]
#[doc = ""]
#[doc = " Must be called before using `unif_rand()`, `norm_rand()`, etc."]
#[doc = " The state is restored with `PutRNGstate()`. The safe forms are"]
#[doc =
" [`RngGuard`](crate::rng::RngGuard), [`with_rng`](crate::rng::with_rng)"]
#[doc = " and `#[miniextendr(rng)]`."]
#[doc = ""]
#[doc = " # Example"]
#[doc = ""]
#[doc = " ```ignore"]
#[doc = " unsafe {"]
#[doc = " GetRNGstate();"]
#[doc = " let x = unif_rand();"]
#[doc = " let y = norm_rand();"]
#[doc = " PutRNGstate();"]
#[doc = " }"]
#[doc = " ```"]
#[doc =
"Checked wrapper for `GetRNGstate`. Calls `GetRNGstate_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 1622, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn GetRNGstate() {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
GetRNGstate_unchecked()
})
});
result.0
}
#[doc = " Restore the RNG state to R\'s global state."]
#[doc = ""]
#[doc = " Must be called after using `unif_rand()`, `norm_rand()`, etc."]
#[doc = " to ensure R\'s `.Random.seed` is updated."]
#[doc =
"Checked wrapper for `PutRNGstate`. Calls `PutRNGstate_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 1628, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn PutRNGstate() {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
PutRNGstate_unchecked()
})
});
result.0
}
#[doc = " Generate a uniform random number in (0, 1)."]
#[doc = ""]
#[doc = " # Important"]
#[doc = ""]
#[doc =
" Must call `GetRNGstate()` before and `PutRNGstate()` after. The safe"]
#[doc = " form is [`RngGuard::unif_rand`](crate::rng::RngGuard::unif_rand)."]
#[doc =
"Checked wrapper for `unif_rand`. Calls `unif_rand_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 1636, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn unif_rand() -> f64 {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
unif_rand_unchecked()
})
});
result.0
}
#[doc = " Generate a standard normal random number (mean 0, sd 1)."]
#[doc = ""]
#[doc = " # Important"]
#[doc = ""]
#[doc =
" Must call `GetRNGstate()` before and `PutRNGstate()` after. The safe"]
#[doc = " form is [`RngGuard::norm_rand`](crate::rng::RngGuard::norm_rand)."]
#[doc =
"Checked wrapper for `norm_rand`. Calls `norm_rand_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 1644, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn norm_rand() -> f64 {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
norm_rand_unchecked()
})
});
result.0
}
#[doc = " Generate an exponential random number with rate 1."]
#[doc = ""]
#[doc = " # Important"]
#[doc = ""]
#[doc =
" Must call `GetRNGstate()` before and `PutRNGstate()` after. The safe"]
#[doc = " form is [`RngGuard::exp_rand`](crate::rng::RngGuard::exp_rand)."]
#[doc =
"Checked wrapper for `exp_rand`. Calls `exp_rand_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 1652, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn exp_rand() -> f64 {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
exp_rand_unchecked()
})
});
result.0
}
#[doc = " Generate a uniform random index in [0, dn)."]
#[doc = ""]
#[doc = " Used for sampling without bias for large n."]
#[doc = ""]
#[doc = " # Important"]
#[doc = ""]
#[doc =
" Must call `GetRNGstate()` before and `PutRNGstate()` after. The safe"]
#[doc =
" form is [`RngGuard::unif_index`](crate::rng::RngGuard::unif_index)."]
#[doc =
"Checked wrapper for `R_unif_index`. Calls `R_unif_index_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 1662, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_unif_index(dn: f64) -> f64 {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_unif_index_unchecked(dn)
})
});
result.0
}
#[doc = " Get the current discrete uniform sample method."]
#[doc =
"Checked wrapper for `R_sample_kind`. Calls `R_sample_kind_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 1665, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_sample_kind() -> Sampletype {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_sample_kind_unchecked()
})
});
result.0
}#[r_ffi_checked]
1604unsafe extern "C-unwind" {
1605 pub fn GetRNGstate();
1623
1624 pub fn PutRNGstate();
1629
1630 pub fn unif_rand() -> f64;
1637
1638 pub fn norm_rand() -> f64;
1645
1646 pub fn exp_rand() -> f64;
1653
1654 pub fn R_unif_index(dn: f64) -> f64;
1663
1664 pub fn R_sample_kind() -> Sampletype;
1666}
1667
1668unsafe extern "C-unwind" {
#[doc =
" Normal density: `dnorm(x, mean = mu, sd = sigma, log = give_log)`."]
#[doc = ""]
#[doc =
" `Rf_dnorm4` from `Rmath.h` (the `dnorm` and `dnorm4` macros resolve"]
#[doc = " to it). A non-zero `give_log` returns the log density."]
#[doc = ""]
#[doc = " # R conditions"]
#[doc = ""]
#[doc =
" An invalid `sigma` (negative) returns `NaN` without a warning: nmath"]
#[doc =
" does not report domain errors, and the \"NaNs produced\" warning that"]
#[doc =
" `stats::dnorm` gives comes from R\'s vectorised wrapper. nmath reports"]
#[doc = " other problems (precision loss, non-convergence) through R\'s"]
#[doc =
" `warning()`, and under `options(warn = 2)` a warning becomes an R"]
#[doc =
" error, which longjmps. Call this where such a longjmp is caught: a"]
#[doc = " `#[miniextendr]` function body, or"]
#[doc =
" [`with_r_unwind_protect`](crate::unwind_protect::with_r_unwind_protect)."]
#[doc =
" `#[r_ffi_checked]` gives thread routing and checking only, not an"]
#[doc = " unwind guard."]
#[doc = "Unchecked FFI binding for `Rf_dnorm4`."]
#[doc = "Generated from source location line 1703, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_dnorm4"]
pub fn Rf_dnorm4_unchecked(x: f64, mu: f64, sigma: f64,
give_log: ::std::os::raw::c_int)
-> f64;
#[doc = " Normal distribution function:"]
#[doc =
" `pnorm(x, mean = mu, sd = sigma, lower.tail = lower_tail, log.p = log_p)`."]
#[doc = ""]
#[doc =
" `Rf_pnorm5` from `Rmath.h` (the `pnorm` and `pnorm5` macros resolve"]
#[doc =
" to it). `lower_tail = 0` computes the upper tail `P[X > x]` directly"]
#[doc =
" (accurate far into the tail, unlike `1 - P[X <= x]`); a non-zero"]
#[doc = " `log_p` returns the log probability."]
#[doc = ""]
#[doc = " # R conditions"]
#[doc = ""]
#[doc =
" An invalid `sigma` (negative) returns `NaN` without a warning (nmath"]
#[doc =
" does not report domain errors). nmath reports other problems through"]
#[doc =
" R\'s `warning()`, and under `options(warn = 2)` a warning becomes an R"]
#[doc =
" error, which longjmps. Call this where such a longjmp is caught: a"]
#[doc = " `#[miniextendr]` function body, or"]
#[doc =
" [`with_r_unwind_protect`](crate::unwind_protect::with_r_unwind_protect)."]
#[doc =
" `#[r_ffi_checked]` gives thread routing and checking only, not an"]
#[doc = " unwind guard."]
#[doc = "Unchecked FFI binding for `Rf_pnorm5`."]
#[doc = "Generated from source location line 1723, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_pnorm5"]
pub fn Rf_pnorm5_unchecked(x: f64, mu: f64, sigma: f64,
lower_tail: ::std::os::raw::c_int, log_p: ::std::os::raw::c_int)
-> f64;
#[doc = " Normal quantile function:"]
#[doc =
" `qnorm(p, mean = mu, sd = sigma, lower.tail = lower_tail, log.p = log_p)`."]
#[doc = ""]
#[doc =
" `Rf_qnorm5` from `Rmath.h` (the `qnorm` and `qnorm5` macros resolve"]
#[doc =
" to it). With a non-zero `log_p`, `p` is a log probability; with"]
#[doc =
" `lower_tail = 0`, `p` is an upper-tail probability. `p = 0` and"]
#[doc =
" `p = 1` (or `-Inf` / `0` on the log scale) return `-Inf` / `Inf` as"]
#[doc = " the tail requires."]
#[doc = ""]
#[doc = " # R conditions"]
#[doc = ""]
#[doc =
" A `p` outside `[0, 1]` (outside `[-Inf, 0]` on the log scale) or a"]
#[doc =
" negative `sigma` returns `NaN` without a warning (nmath does not"]
#[doc =
" report domain errors). nmath reports other problems through R\'s"]
#[doc =
" `warning()`, and under `options(warn = 2)` a warning becomes an R"]
#[doc =
" error, which longjmps. Call this where such a longjmp is caught: a"]
#[doc = " `#[miniextendr]` function body, or"]
#[doc =
" [`with_r_unwind_protect`](crate::unwind_protect::with_r_unwind_protect)."]
#[doc =
" `#[r_ffi_checked]` gives thread routing and checking only, not an"]
#[doc = " unwind guard."]
#[doc = "Unchecked FFI binding for `Rf_qnorm5`."]
#[doc = "Generated from source location line 1751, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_qnorm5"]
pub fn Rf_qnorm5_unchecked(p: f64, mu: f64, sigma: f64,
lower_tail: ::std::os::raw::c_int, log_p: ::std::os::raw::c_int)
-> f64;
#[doc = " Chi-squared quantile function:"]
#[doc =
" `qchisq(p, df, lower.tail = lower_tail, log.p = log_p)` (central only;"]
#[doc = " `stats::qchisq` with `ncp` calls a different routine)."]
#[doc = ""]
#[doc =
" `Rf_qchisq` from `Rmath.h` (the `qchisq` macro resolves to it). It is"]
#[doc =
" R\'s gamma quantile with shape `df / 2` and scale `2`. The flags have"]
#[doc = " the same meaning as for [`Rf_qnorm5`]."]
#[doc = ""]
#[doc = " # R conditions"]
#[doc = ""]
#[doc =
" A `p` outside the probability range or a negative `df` returns `NaN`"]
#[doc =
" without a warning (nmath does not report domain errors). The gamma"]
#[doc =
" quantile iterates, and nmath reports non-convergence or precision"]
#[doc =
" loss in it (and in the gamma distribution function it calls) through"]
#[doc =
" R\'s `warning()`; under `options(warn = 2)` that warning becomes an R"]
#[doc =
" error, which longjmps. Call this where such a longjmp is caught: a"]
#[doc = " `#[miniextendr]` function body, or"]
#[doc =
" [`with_r_unwind_protect`](crate::unwind_protect::with_r_unwind_protect)."]
#[doc =
" `#[r_ffi_checked]` gives thread routing and checking only, not an"]
#[doc = " unwind guard."]
#[doc = "Unchecked FFI binding for `Rf_qchisq`."]
#[doc = "Generated from source location line 1779, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_qchisq"]
pub fn Rf_qchisq_unchecked(p: f64, df: f64,
lower_tail: ::std::os::raw::c_int, log_p: ::std::os::raw::c_int)
-> f64;
}
#[doc = " Normal density: `dnorm(x, mean = mu, sd = sigma, log = give_log)`."]
#[doc = ""]
#[doc =
" `Rf_dnorm4` from `Rmath.h` (the `dnorm` and `dnorm4` macros resolve"]
#[doc = " to it). A non-zero `give_log` returns the log density."]
#[doc = ""]
#[doc = " # R conditions"]
#[doc = ""]
#[doc =
" An invalid `sigma` (negative) returns `NaN` without a warning: nmath"]
#[doc =
" does not report domain errors, and the \"NaNs produced\" warning that"]
#[doc =
" `stats::dnorm` gives comes from R\'s vectorised wrapper. nmath reports"]
#[doc = " other problems (precision loss, non-convergence) through R\'s"]
#[doc = " `warning()`, and under `options(warn = 2)` a warning becomes an R"]
#[doc = " error, which longjmps. Call this where such a longjmp is caught: a"]
#[doc = " `#[miniextendr]` function body, or"]
#[doc =
" [`with_r_unwind_protect`](crate::unwind_protect::with_r_unwind_protect)."]
#[doc = " `#[r_ffi_checked]` gives thread routing and checking only, not an"]
#[doc = " unwind guard."]
#[doc =
"Checked wrapper for `Rf_dnorm4`. Calls `Rf_dnorm4_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 1703, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_dnorm4(x: f64, mu: f64, sigma: f64,
give_log: ::std::os::raw::c_int) -> f64 {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_dnorm4_unchecked(x, mu, sigma, give_log)
})
});
result.0
}
#[doc = " Normal distribution function:"]
#[doc =
" `pnorm(x, mean = mu, sd = sigma, lower.tail = lower_tail, log.p = log_p)`."]
#[doc = ""]
#[doc =
" `Rf_pnorm5` from `Rmath.h` (the `pnorm` and `pnorm5` macros resolve"]
#[doc =
" to it). `lower_tail = 0` computes the upper tail `P[X > x]` directly"]
#[doc = " (accurate far into the tail, unlike `1 - P[X <= x]`); a non-zero"]
#[doc = " `log_p` returns the log probability."]
#[doc = ""]
#[doc = " # R conditions"]
#[doc = ""]
#[doc =
" An invalid `sigma` (negative) returns `NaN` without a warning (nmath"]
#[doc =
" does not report domain errors). nmath reports other problems through"]
#[doc =
" R\'s `warning()`, and under `options(warn = 2)` a warning becomes an R"]
#[doc = " error, which longjmps. Call this where such a longjmp is caught: a"]
#[doc = " `#[miniextendr]` function body, or"]
#[doc =
" [`with_r_unwind_protect`](crate::unwind_protect::with_r_unwind_protect)."]
#[doc = " `#[r_ffi_checked]` gives thread routing and checking only, not an"]
#[doc = " unwind guard."]
#[doc =
"Checked wrapper for `Rf_pnorm5`. Calls `Rf_pnorm5_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 1723, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_pnorm5(x: f64, mu: f64, sigma: f64,
lower_tail: ::std::os::raw::c_int, log_p: ::std::os::raw::c_int) -> f64 {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_pnorm5_unchecked(x, mu, sigma, lower_tail, log_p)
})
});
result.0
}
#[doc = " Normal quantile function:"]
#[doc =
" `qnorm(p, mean = mu, sd = sigma, lower.tail = lower_tail, log.p = log_p)`."]
#[doc = ""]
#[doc =
" `Rf_qnorm5` from `Rmath.h` (the `qnorm` and `qnorm5` macros resolve"]
#[doc = " to it). With a non-zero `log_p`, `p` is a log probability; with"]
#[doc = " `lower_tail = 0`, `p` is an upper-tail probability. `p = 0` and"]
#[doc =
" `p = 1` (or `-Inf` / `0` on the log scale) return `-Inf` / `Inf` as"]
#[doc = " the tail requires."]
#[doc = ""]
#[doc = " # R conditions"]
#[doc = ""]
#[doc = " A `p` outside `[0, 1]` (outside `[-Inf, 0]` on the log scale) or a"]
#[doc = " negative `sigma` returns `NaN` without a warning (nmath does not"]
#[doc = " report domain errors). nmath reports other problems through R\'s"]
#[doc = " `warning()`, and under `options(warn = 2)` a warning becomes an R"]
#[doc = " error, which longjmps. Call this where such a longjmp is caught: a"]
#[doc = " `#[miniextendr]` function body, or"]
#[doc =
" [`with_r_unwind_protect`](crate::unwind_protect::with_r_unwind_protect)."]
#[doc = " `#[r_ffi_checked]` gives thread routing and checking only, not an"]
#[doc = " unwind guard."]
#[doc =
"Checked wrapper for `Rf_qnorm5`. Calls `Rf_qnorm5_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 1751, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_qnorm5(p: f64, mu: f64, sigma: f64,
lower_tail: ::std::os::raw::c_int, log_p: ::std::os::raw::c_int) -> f64 {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_qnorm5_unchecked(p, mu, sigma, lower_tail, log_p)
})
});
result.0
}
#[doc = " Chi-squared quantile function:"]
#[doc =
" `qchisq(p, df, lower.tail = lower_tail, log.p = log_p)` (central only;"]
#[doc = " `stats::qchisq` with `ncp` calls a different routine)."]
#[doc = ""]
#[doc =
" `Rf_qchisq` from `Rmath.h` (the `qchisq` macro resolves to it). It is"]
#[doc =
" R\'s gamma quantile with shape `df / 2` and scale `2`. The flags have"]
#[doc = " the same meaning as for [`Rf_qnorm5`]."]
#[doc = ""]
#[doc = " # R conditions"]
#[doc = ""]
#[doc =
" A `p` outside the probability range or a negative `df` returns `NaN`"]
#[doc = " without a warning (nmath does not report domain errors). The gamma"]
#[doc = " quantile iterates, and nmath reports non-convergence or precision"]
#[doc =
" loss in it (and in the gamma distribution function it calls) through"]
#[doc =
" R\'s `warning()`; under `options(warn = 2)` that warning becomes an R"]
#[doc = " error, which longjmps. Call this where such a longjmp is caught: a"]
#[doc = " `#[miniextendr]` function body, or"]
#[doc =
" [`with_r_unwind_protect`](crate::unwind_protect::with_r_unwind_protect)."]
#[doc = " `#[r_ffi_checked]` gives thread routing and checking only, not an"]
#[doc = " unwind guard."]
#[doc =
"Checked wrapper for `Rf_qchisq`. Calls `Rf_qchisq_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 1779, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_qchisq(p: f64, df: f64, lower_tail: ::std::os::raw::c_int,
log_p: ::std::os::raw::c_int) -> f64 {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_qchisq_unchecked(p, df, lower_tail, log_p)
})
});
result.0
}#[r_ffi_checked]
1685unsafe extern "C-unwind" {
1686 pub fn Rf_dnorm4(x: f64, mu: f64, sigma: f64, give_log: ::std::os::raw::c_int) -> f64;
1704
1705 pub fn Rf_pnorm5(
1724 x: f64,
1725 mu: f64,
1726 sigma: f64,
1727 lower_tail: ::std::os::raw::c_int,
1728 log_p: ::std::os::raw::c_int,
1729 ) -> f64;
1730
1731 pub fn Rf_qnorm5(
1752 p: f64,
1753 mu: f64,
1754 sigma: f64,
1755 lower_tail: ::std::os::raw::c_int,
1756 log_p: ::std::os::raw::c_int,
1757 ) -> f64;
1758
1759 pub fn Rf_qchisq(
1780 p: f64,
1781 df: f64,
1782 lower_tail: ::std::os::raw::c_int,
1783 log_p: ::std::os::raw::c_int,
1784 ) -> f64;
1785}
1786
1787#[allow(non_camel_case_types)]
1809pub type optimfn = unsafe extern "C-unwind" fn(
1810 n: ::std::os::raw::c_int,
1811 par: *mut f64,
1812 ex: *mut ::std::os::raw::c_void,
1813) -> f64;
1814
1815#[allow(non_camel_case_types)]
1823pub type optimgr = unsafe extern "C-unwind" fn(
1824 n: ::std::os::raw::c_int,
1825 par: *mut f64,
1826 gr: *mut f64,
1827 ex: *mut ::std::os::raw::c_void,
1828);
1829
1830unsafe extern "C-unwind" {
#[doc = " Bound-constrained limited-memory BFGS minimiser: `lbfgsb` in"]
#[doc =
" `R_ext/Applic.h`, the routine behind `optim(method = \"L-BFGS-B\")`."]
#[doc = ""]
#[doc = " # Arguments"]
#[doc = ""]
#[doc =
" - `n`: number of parameters. With `n = 0` it calls `fn_(0, u, ex)`"]
#[doc =
" once and returns `fail = 0`, `fncount = 1`, `grcount = 0` and the"]
#[doc = " message `\"NOTHING TO DO\"`."]
#[doc =
" - `m`: number of correction pairs kept (`optim`\'s `lmm`, default 5)."]
#[doc = " - `x`: `n` starting values; overwritten with the solution."]
#[doc =
" - `l`, `u`: `n` lower and upper bounds, read where `nbd` says so."]
#[doc =
" - `nbd`: `n` bound codes: `0` unbounded, `1` lower bound only, `2`"]
#[doc =
" both bounds, `3` upper bound only. Code `2` with `l[i] == u[i]`"]
#[doc = " fixes parameter `i`."]
#[doc =
" - `fmin`: receives the last objective value computed, the one at the"]
#[doc =
" returned `x` on convergence. It is not meaningful when the input"]
#[doc = " checks fail (`fail = 52` before any evaluation)."]
#[doc =
" - `fn_`, `gr`: objective and gradient callbacks. Both are required"]
#[doc = " (R calls them unconditionally)."]
#[doc =
" - `fail`: receives `0` (converged), `1` (`maxit` reached; the message"]
#[doc =
" is then `\"NEW_X\"`), `51` (a `\"WARNING: ...\"` from the line search)"]
#[doc =
" or `52` (an `\"ERROR: ...\"`, such as an invalid `nbd` code or"]
#[doc = " `l[i] > u[i]` under code `2`)."]
#[doc = " - `ex`: passed unchanged to both callbacks."]
#[doc =
" - `factr`: relative-reduction tolerance in units of machine epsilon"]
#[doc = " (`optim`\'s default `1e7`)."]
#[doc =
" - `pgtol`: projected-gradient tolerance (with `optim`\'s default `0`"]
#[doc = " only an exactly zero projected gradient stops on it)."]
#[doc =
" - `fncount`, `grcount`: receive the evaluation counts (R stores the"]
#[doc = " same count in both, except with `n = 0`: see `n` above)."]
#[doc = " - `maxit`: iteration limit."]
#[doc =
" - `msg`: caller-owned buffer of at least 60 bytes (C `char msg[60]`);"]
#[doc = " receives a NUL-terminated status such as"]
#[doc = " `\"CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH\"`."]
#[doc =
" - `trace`: `0` is silent; `1` to `6` print progress through `Rprintf`."]
#[doc =
" - `nreport`: progress interval in iterations. It must be at least `1`"]
#[doc = " even when `trace = 0`."]
#[doc = ""]
#[doc =
" The routine keeps a limited-memory approximation of the inverse"]
#[doc =
" Hessian internally and does not return it. That approximation is a"]
#[doc =
" search device, not an inferential covariance: compute the Hessian at"]
#[doc = " the optimum (as `stats::optimHess` does) for standard errors."]
#[doc = ""]
#[doc = " # Safety"]
#[doc = ""]
#[doc =
" - `x`, `l`, `u` and `nbd` must be valid for `n` elements, `msg` must"]
#[doc =
" be writable for 60 bytes, and the other out-pointers must be valid."]
#[doc =
" `ex` must stay valid for the whole call: the callbacks receive it"]
#[doc = " on every evaluation."]
#[doc = " - `lbfgsb` raises R errors itself (an R longjmp): when"]
#[doc =
" `nreport <= 0`, and when the objective returns a non-finite value"]
#[doc =
" (\"L-BFGS-B needs finite values of \'fn\'\"). Call it where such a"]
#[doc = " longjmp is caught: a `#[miniextendr]` function body, or"]
#[doc =
" [`with_r_unwind_protect`](crate::unwind_protect::with_r_unwind_protect)."]
#[doc =
" `#[r_ffi_checked]` gives thread routing and checking only, not an"]
#[doc = " unwind guard."]
#[doc =
" - The callbacks must not let a Rust panic unwind through `lbfgsb`\'s"]
#[doc = " frames (see [`optimfn`])."]
#[doc =
" - The workspace comes from `R_alloc` / `S_alloc`, R\'s transient"]
#[doc =
" allocation stack. R reclaims it when the enclosing `.Call` returns;"]
#[doc =
" outside `.Call`, bracket the call with [`vmaxget`] / [`vmaxset`]."]
#[allow(clippy::too_many_arguments)]
#[doc = "Unchecked FFI binding for `lbfgsb`."]
#[doc = "Generated from source location line 1894, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "lbfgsb"]
pub fn lbfgsb_unchecked(n: ::std::os::raw::c_int,
m: ::std::os::raw::c_int, x: *mut f64, l: *mut f64, u: *mut f64,
nbd: *mut ::std::os::raw::c_int, fmin: *mut f64, fn_: optimfn,
gr: optimgr, fail: *mut ::std::os::raw::c_int,
ex: *mut ::std::os::raw::c_void, factr: f64, pgtol: f64,
fncount: *mut ::std::os::raw::c_int, grcount: *mut ::std::os::raw::c_int,
maxit: ::std::os::raw::c_int, msg: *mut ::std::os::raw::c_char,
trace: ::std::os::raw::c_int, nreport: ::std::os::raw::c_int);
}
#[doc = " Bound-constrained limited-memory BFGS minimiser: `lbfgsb` in"]
#[doc =
" `R_ext/Applic.h`, the routine behind `optim(method = \"L-BFGS-B\")`."]
#[doc = ""]
#[doc = " # Arguments"]
#[doc = ""]
#[doc = " - `n`: number of parameters. With `n = 0` it calls `fn_(0, u, ex)`"]
#[doc =
" once and returns `fail = 0`, `fncount = 1`, `grcount = 0` and the"]
#[doc = " message `\"NOTHING TO DO\"`."]
#[doc =
" - `m`: number of correction pairs kept (`optim`\'s `lmm`, default 5)."]
#[doc = " - `x`: `n` starting values; overwritten with the solution."]
#[doc = " - `l`, `u`: `n` lower and upper bounds, read where `nbd` says so."]
#[doc = " - `nbd`: `n` bound codes: `0` unbounded, `1` lower bound only, `2`"]
#[doc = " both bounds, `3` upper bound only. Code `2` with `l[i] == u[i]`"]
#[doc = " fixes parameter `i`."]
#[doc =
" - `fmin`: receives the last objective value computed, the one at the"]
#[doc = " returned `x` on convergence. It is not meaningful when the input"]
#[doc = " checks fail (`fail = 52` before any evaluation)."]
#[doc = " - `fn_`, `gr`: objective and gradient callbacks. Both are required"]
#[doc = " (R calls them unconditionally)."]
#[doc =
" - `fail`: receives `0` (converged), `1` (`maxit` reached; the message"]
#[doc =
" is then `\"NEW_X\"`), `51` (a `\"WARNING: ...\"` from the line search)"]
#[doc = " or `52` (an `\"ERROR: ...\"`, such as an invalid `nbd` code or"]
#[doc = " `l[i] > u[i]` under code `2`)."]
#[doc = " - `ex`: passed unchanged to both callbacks."]
#[doc =
" - `factr`: relative-reduction tolerance in units of machine epsilon"]
#[doc = " (`optim`\'s default `1e7`)."]
#[doc =
" - `pgtol`: projected-gradient tolerance (with `optim`\'s default `0`"]
#[doc = " only an exactly zero projected gradient stops on it)."]
#[doc =
" - `fncount`, `grcount`: receive the evaluation counts (R stores the"]
#[doc = " same count in both, except with `n = 0`: see `n` above)."]
#[doc = " - `maxit`: iteration limit."]
#[doc =
" - `msg`: caller-owned buffer of at least 60 bytes (C `char msg[60]`);"]
#[doc = " receives a NUL-terminated status such as"]
#[doc = " `\"CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH\"`."]
#[doc =
" - `trace`: `0` is silent; `1` to `6` print progress through `Rprintf`."]
#[doc =
" - `nreport`: progress interval in iterations. It must be at least `1`"]
#[doc = " even when `trace = 0`."]
#[doc = ""]
#[doc = " The routine keeps a limited-memory approximation of the inverse"]
#[doc = " Hessian internally and does not return it. That approximation is a"]
#[doc =
" search device, not an inferential covariance: compute the Hessian at"]
#[doc = " the optimum (as `stats::optimHess` does) for standard errors."]
#[doc = ""]
#[doc = " # Safety"]
#[doc = ""]
#[doc =
" - `x`, `l`, `u` and `nbd` must be valid for `n` elements, `msg` must"]
#[doc =
" be writable for 60 bytes, and the other out-pointers must be valid."]
#[doc =
" `ex` must stay valid for the whole call: the callbacks receive it"]
#[doc = " on every evaluation."]
#[doc = " - `lbfgsb` raises R errors itself (an R longjmp): when"]
#[doc =
" `nreport <= 0`, and when the objective returns a non-finite value"]
#[doc =
" (\"L-BFGS-B needs finite values of \'fn\'\"). Call it where such a"]
#[doc = " longjmp is caught: a `#[miniextendr]` function body, or"]
#[doc =
" [`with_r_unwind_protect`](crate::unwind_protect::with_r_unwind_protect)."]
#[doc =
" `#[r_ffi_checked]` gives thread routing and checking only, not an"]
#[doc = " unwind guard."]
#[doc =
" - The callbacks must not let a Rust panic unwind through `lbfgsb`\'s"]
#[doc = " frames (see [`optimfn`])."]
#[doc = " - The workspace comes from `R_alloc` / `S_alloc`, R\'s transient"]
#[doc =
" allocation stack. R reclaims it when the enclosing `.Call` returns;"]
#[doc =
" outside `.Call`, bracket the call with [`vmaxget`] / [`vmaxset`]."]
#[allow(clippy::too_many_arguments)]
#[doc =
"Checked wrapper for `lbfgsb`. Calls `lbfgsb_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 1894, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn lbfgsb(n: ::std::os::raw::c_int, m: ::std::os::raw::c_int,
x: *mut f64, l: *mut f64, u: *mut f64, nbd: *mut ::std::os::raw::c_int,
fmin: *mut f64, fn_: optimfn, gr: optimgr,
fail: *mut ::std::os::raw::c_int, ex: *mut ::std::os::raw::c_void,
factr: f64, pgtol: f64, fncount: *mut ::std::os::raw::c_int,
grcount: *mut ::std::os::raw::c_int, maxit: ::std::os::raw::c_int,
msg: *mut ::std::os::raw::c_char, trace: ::std::os::raw::c_int,
nreport: ::std::os::raw::c_int) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
lbfgsb_unchecked(n, m, x, l, u, nbd, fmin, fn_, gr, fail,
ex, factr, pgtol, fncount, grcount, maxit, msg, trace,
nreport)
})
});
result.0
}#[r_ffi_checked]
1831unsafe extern "C-unwind" {
1832 #[allow(clippy::too_many_arguments)]
1894 pub fn lbfgsb(
1895 n: ::std::os::raw::c_int,
1896 m: ::std::os::raw::c_int,
1897 x: *mut f64,
1898 l: *mut f64,
1899 u: *mut f64,
1900 nbd: *mut ::std::os::raw::c_int,
1901 fmin: *mut f64,
1902 fn_: optimfn,
1903 gr: optimgr,
1904 fail: *mut ::std::os::raw::c_int,
1905 ex: *mut ::std::os::raw::c_void,
1906 factr: f64,
1907 pgtol: f64,
1908 fncount: *mut ::std::os::raw::c_int,
1909 grcount: *mut ::std::os::raw::c_int,
1910 maxit: ::std::os::raw::c_int,
1911 msg: *mut ::std::os::raw::c_char,
1912 trace: ::std::os::raw::c_int,
1913 nreport: ::std::os::raw::c_int,
1914 );
1915}
1916
1917#[allow(non_camel_case_types)]
1969#[cfg(feature = "blas-lapack")]
1970pub type FC_LEN_T = usize;
1971
1972#[cfg(feature = "blas-lapack")]
1974const _: () = assert!(
1975 ::std::mem::size_of::<::std::os::raw::c_int>() == 4,
1976 "R's BLAS/LAPACK use a 32-bit INTEGER (C int); ILP64 is not supported"
1977);
1978
1979#[cfg(feature = "blas-lapack")]
1980#[r_ffi_checked]
1981unsafe extern "C-unwind" {
1982 #[allow(clippy::too_many_arguments)]
2029 pub fn dgemm_(
2030 transa: *const ::std::os::raw::c_char,
2031 transb: *const ::std::os::raw::c_char,
2032 m: *const ::std::os::raw::c_int,
2033 n: *const ::std::os::raw::c_int,
2034 k: *const ::std::os::raw::c_int,
2035 alpha: *const f64,
2036 a: *const f64,
2037 lda: *const ::std::os::raw::c_int,
2038 b: *const f64,
2039 ldb: *const ::std::os::raw::c_int,
2040 beta: *const f64,
2041 c: *mut f64,
2042 ldc: *const ::std::os::raw::c_int,
2043 transa_len: FC_LEN_T,
2044 transb_len: FC_LEN_T,
2045 );
2046
2047 #[allow(clippy::too_many_arguments)]
2091 pub fn dgesv_(
2092 n: *const ::std::os::raw::c_int,
2093 nrhs: *const ::std::os::raw::c_int,
2094 a: *mut f64,
2095 lda: *const ::std::os::raw::c_int,
2096 ipiv: *mut ::std::os::raw::c_int,
2097 b: *mut f64,
2098 ldb: *const ::std::os::raw::c_int,
2099 info: *mut ::std::os::raw::c_int,
2100 );
2101}
2102
2103unsafe extern "C-unwind" {
#[doc = " Get the current R memory stack watermark."]
#[doc = ""]
#[doc = " Use with `vmaxset()` to restore memory stack state."]
#[doc =
" Memory allocated with `R_alloc()` between `vmaxget()` and `vmaxset()`"]
#[doc = " will be freed when `vmaxset()` is called."]
#[doc = ""]
#[doc = " # Example"]
#[doc = ""]
#[doc = " ```ignore"]
#[doc = " unsafe {"]
#[doc = " let watermark = vmaxget();"]
#[doc = " let buf = R_alloc(100, 1);"]
#[doc = " // ... use buf ..."]
#[doc = " vmaxset(watermark); // frees buf"]
#[doc = " }"]
#[doc = " ```"]
#[doc = "Unchecked FFI binding for `vmaxget`."]
#[doc = "Generated from source location line 2125, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "vmaxget"]
pub fn vmaxget_unchecked()
-> *mut ::std::os::raw::c_void;
#[doc =
" Set the R memory stack watermark, freeing memory allocated since the mark."]
#[doc = ""]
#[doc = " # Safety"]
#[doc = ""]
#[doc =
" `ovmax` must be a value returned by `vmaxget()` called earlier in the"]
#[doc = " same R evaluation context."]
#[doc = "Unchecked FFI binding for `vmaxset`."]
#[doc = "Generated from source location line 2133, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "vmaxset"]
pub fn vmaxset_unchecked(ovmax: *const ::std::os::raw::c_void);
#[doc = " Run the R garbage collector."]
#[doc = ""]
#[doc = " Forces a full garbage collection cycle."]
#[doc = "Unchecked FFI binding for `R_gc`."]
#[doc = "Generated from source location line 2138, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_gc"]
pub fn R_gc_unchecked();
#[doc = " Check if the garbage collector is currently running."]
#[doc = ""]
#[doc = " Returns non-zero if GC is in progress."]
#[doc = "Unchecked FFI binding for `R_gc_running`."]
#[doc = "Generated from source location line 2143, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_gc_running"]
pub fn R_gc_running_unchecked()
-> ::std::os::raw::c_int;
#[doc = " Allocate memory on R\'s memory stack."]
#[doc = ""]
#[doc =
" This memory is automatically freed when the calling R function returns,"]
#[doc = " or can be freed earlier with `vmaxset()`."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `nelem`: Number of elements to allocate"]
#[doc = " - `eltsize`: Size of each element in bytes"]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc =
" Pointer to allocated memory (as `char*` for compatibility with S)."]
#[doc = "Unchecked FFI binding for `R_alloc`."]
#[doc = "Generated from source location line 2158, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_alloc"]
pub fn R_alloc_unchecked(nelem: usize, eltsize: ::std::os::raw::c_int)
-> *mut ::std::os::raw::c_char;
#[doc = " Allocate an array of long doubles on R\'s memory stack."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `nelem`: Number of long double elements to allocate"]
#[doc = "Unchecked FFI binding for `R_allocLD`."]
#[doc = "Generated from source location line 2165, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_allocLD"]
pub fn R_allocLD_unchecked(nelem: usize)
-> *mut f64;
#[doc = " S compatibility: allocate zeroed memory on R\'s memory stack."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `nelem`: Number of elements"]
#[doc = " - `eltsize`: Size of each element"]
#[doc = "Unchecked FFI binding for `S_alloc`."]
#[doc = "Generated from source location line 2173, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "S_alloc"]
pub fn S_alloc_unchecked(nelem: ::std::os::raw::c_long,
eltsize: ::std::os::raw::c_int)
-> *mut ::std::os::raw::c_char;
#[doc = " S compatibility: reallocate memory on R\'s memory stack."]
#[doc = ""]
#[doc = " # Safety"]
#[doc = ""]
#[doc = " `ptr` must have been allocated by `S_alloc`."]
#[doc = "Unchecked FFI binding for `S_realloc`."]
#[doc = "Generated from source location line 2183, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "S_realloc"]
pub fn S_realloc_unchecked(ptr: *mut ::std::os::raw::c_char,
newsize: ::std::os::raw::c_long, oldsize: ::std::os::raw::c_long,
eltsize: ::std::os::raw::c_int)
-> *mut ::std::os::raw::c_char;
#[doc = " GC-aware malloc."]
#[doc = ""]
#[doc = " Triggers GC if allocation fails, then retries."]
#[doc = " Memory must be freed with `free()`."]
#[doc = "Unchecked FFI binding for `R_malloc_gc`."]
#[doc = "Generated from source location line 2194, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_malloc_gc"]
pub fn R_malloc_gc_unchecked(size: usize)
-> *mut ::std::os::raw::c_void;
#[doc = " GC-aware calloc."]
#[doc = ""]
#[doc = " Triggers GC if allocation fails, then retries."]
#[doc = " Memory must be freed with `free()`."]
#[doc = "Unchecked FFI binding for `R_calloc_gc`."]
#[doc = "Generated from source location line 2200, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_calloc_gc"]
pub fn R_calloc_gc_unchecked(nelem: usize, eltsize: usize)
-> *mut ::std::os::raw::c_void;
#[doc = " GC-aware realloc."]
#[doc = ""]
#[doc = " Triggers GC if allocation fails, then retries."]
#[doc = " Memory must be freed with `free()`."]
#[doc = "Unchecked FFI binding for `R_realloc_gc`."]
#[doc = "Generated from source location line 2206, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_realloc_gc"]
pub fn R_realloc_gc_unchecked(ptr: *mut ::std::os::raw::c_void,
size: usize)
-> *mut ::std::os::raw::c_void;
}
#[doc = " Get the current R memory stack watermark."]
#[doc = ""]
#[doc = " Use with `vmaxset()` to restore memory stack state."]
#[doc =
" Memory allocated with `R_alloc()` between `vmaxget()` and `vmaxset()`"]
#[doc = " will be freed when `vmaxset()` is called."]
#[doc = ""]
#[doc = " # Example"]
#[doc = ""]
#[doc = " ```ignore"]
#[doc = " unsafe {"]
#[doc = " let watermark = vmaxget();"]
#[doc = " let buf = R_alloc(100, 1);"]
#[doc = " // ... use buf ..."]
#[doc = " vmaxset(watermark); // frees buf"]
#[doc = " }"]
#[doc = " ```"]
#[doc =
"Checked wrapper for `vmaxget`. Calls `vmaxget_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2125, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn vmaxget() -> *mut ::std::os::raw::c_void {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
vmaxget_unchecked()
})
});
result.0
}
#[doc =
" Set the R memory stack watermark, freeing memory allocated since the mark."]
#[doc = ""]
#[doc = " # Safety"]
#[doc = ""]
#[doc =
" `ovmax` must be a value returned by `vmaxget()` called earlier in the"]
#[doc = " same R evaluation context."]
#[doc =
"Checked wrapper for `vmaxset`. Calls `vmaxset_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2133, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn vmaxset(ovmax: *const ::std::os::raw::c_void) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
vmaxset_unchecked(ovmax)
})
});
result.0
}
#[doc = " Run the R garbage collector."]
#[doc = ""]
#[doc = " Forces a full garbage collection cycle."]
#[doc =
"Checked wrapper for `R_gc`. Calls `R_gc_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2138, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_gc() {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_gc_unchecked()
})
});
result.0
}
#[doc = " Check if the garbage collector is currently running."]
#[doc = ""]
#[doc = " Returns non-zero if GC is in progress."]
#[doc =
"Checked wrapper for `R_gc_running`. Calls `R_gc_running_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2143, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_gc_running() -> ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_gc_running_unchecked()
})
});
result.0
}
#[doc = " Allocate memory on R\'s memory stack."]
#[doc = ""]
#[doc =
" This memory is automatically freed when the calling R function returns,"]
#[doc = " or can be freed earlier with `vmaxset()`."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `nelem`: Number of elements to allocate"]
#[doc = " - `eltsize`: Size of each element in bytes"]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc = " Pointer to allocated memory (as `char*` for compatibility with S)."]
#[doc =
"Checked wrapper for `R_alloc`. Calls `R_alloc_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2158, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_alloc(nelem: usize, eltsize: ::std::os::raw::c_int)
-> *mut ::std::os::raw::c_char {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_alloc_unchecked(nelem, eltsize)
})
});
result.0
}
#[doc = " Allocate an array of long doubles on R\'s memory stack."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `nelem`: Number of long double elements to allocate"]
#[doc =
"Checked wrapper for `R_allocLD`. Calls `R_allocLD_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2165, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_allocLD(nelem: usize) -> *mut f64 {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_allocLD_unchecked(nelem)
})
});
result.0
}
#[doc = " S compatibility: allocate zeroed memory on R\'s memory stack."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `nelem`: Number of elements"]
#[doc = " - `eltsize`: Size of each element"]
#[doc =
"Checked wrapper for `S_alloc`. Calls `S_alloc_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2173, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn S_alloc(nelem: ::std::os::raw::c_long,
eltsize: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
S_alloc_unchecked(nelem, eltsize)
})
});
result.0
}
#[doc = " S compatibility: reallocate memory on R\'s memory stack."]
#[doc = ""]
#[doc = " # Safety"]
#[doc = ""]
#[doc = " `ptr` must have been allocated by `S_alloc`."]
#[doc =
"Checked wrapper for `S_realloc`. Calls `S_realloc_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2183, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn S_realloc(ptr: *mut ::std::os::raw::c_char,
newsize: ::std::os::raw::c_long, oldsize: ::std::os::raw::c_long,
eltsize: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
S_realloc_unchecked(ptr, newsize, oldsize, eltsize)
})
});
result.0
}
#[doc = " GC-aware malloc."]
#[doc = ""]
#[doc = " Triggers GC if allocation fails, then retries."]
#[doc = " Memory must be freed with `free()`."]
#[doc =
"Checked wrapper for `R_malloc_gc`. Calls `R_malloc_gc_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2194, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_malloc_gc(size: usize) -> *mut ::std::os::raw::c_void {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_malloc_gc_unchecked(size)
})
});
result.0
}
#[doc = " GC-aware calloc."]
#[doc = ""]
#[doc = " Triggers GC if allocation fails, then retries."]
#[doc = " Memory must be freed with `free()`."]
#[doc =
"Checked wrapper for `R_calloc_gc`. Calls `R_calloc_gc_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2200, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_calloc_gc(nelem: usize, eltsize: usize)
-> *mut ::std::os::raw::c_void {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_calloc_gc_unchecked(nelem, eltsize)
})
});
result.0
}
#[doc = " GC-aware realloc."]
#[doc = ""]
#[doc = " Triggers GC if allocation fails, then retries."]
#[doc = " Memory must be freed with `free()`."]
#[doc =
"Checked wrapper for `R_realloc_gc`. Calls `R_realloc_gc_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2206, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_realloc_gc(ptr: *mut ::std::os::raw::c_void, size: usize)
-> *mut ::std::os::raw::c_void {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_realloc_gc_unchecked(ptr, size)
})
});
result.0
}#[r_ffi_checked]
2108unsafe extern "C-unwind" {
2109 pub fn vmaxget() -> *mut ::std::os::raw::c_void;
2126
2127 pub fn vmaxset(ovmax: *const ::std::os::raw::c_void);
2134
2135 pub fn R_gc();
2139
2140 pub fn R_gc_running() -> ::std::os::raw::c_int;
2144
2145 pub fn R_alloc(nelem: usize, eltsize: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char;
2159
2160 pub fn R_allocLD(nelem: usize) -> *mut f64; pub fn S_alloc(
2174 nelem: ::std::os::raw::c_long,
2175 eltsize: ::std::os::raw::c_int,
2176 ) -> *mut ::std::os::raw::c_char;
2177
2178 pub fn S_realloc(
2184 ptr: *mut ::std::os::raw::c_char,
2185 newsize: ::std::os::raw::c_long,
2186 oldsize: ::std::os::raw::c_long,
2187 eltsize: ::std::os::raw::c_int,
2188 ) -> *mut ::std::os::raw::c_char;
2189
2190 pub fn R_malloc_gc(size: usize) -> *mut ::std::os::raw::c_void;
2195
2196 pub fn R_calloc_gc(nelem: usize, eltsize: usize) -> *mut ::std::os::raw::c_void;
2201
2202 pub fn R_realloc_gc(
2207 ptr: *mut ::std::os::raw::c_void,
2208 size: usize,
2209 ) -> *mut ::std::os::raw::c_void;
2210}
2211
2212unsafe extern "C-unwind" {
#[doc = " Sort an integer vector in place (ascending order)."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Pointer to integer array"]
#[doc = " - `n`: Number of elements"]
#[doc = "Unchecked FFI binding for `R_isort`."]
#[doc = "Generated from source location line 2224, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_isort"]
pub fn R_isort_unchecked(x: *mut ::std::os::raw::c_int,
n: ::std::os::raw::c_int);
#[doc = " Sort a double vector in place (ascending order)."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Pointer to double array"]
#[doc = " - `n`: Number of elements"]
#[doc = "Unchecked FFI binding for `R_rsort`."]
#[doc = "Generated from source location line 2232, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_rsort"]
pub fn R_rsort_unchecked(x: *mut f64, n: ::std::os::raw::c_int);
#[doc = " Sort a complex vector in place."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Pointer to Rcomplex array"]
#[doc = " - `n`: Number of elements"]
#[doc = "Unchecked FFI binding for `R_csort`."]
#[doc = "Generated from source location line 2240, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_csort"]
pub fn R_csort_unchecked(x: *mut Rcomplex, n: ::std::os::raw::c_int);
#[doc =
" Sort doubles in descending order, carrying along an index array."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `a`: Pointer to double array (sorted in place, descending)"]
#[doc = " - `ib`: Pointer to integer array (permuted alongside `a`)"]
#[doc = " - `n`: Number of elements"]
#[doc(alias = "Rf_revsort")]
#[doc = "Unchecked FFI binding for `revsort`."]
#[doc = "Generated from source location line 2250, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "revsort"]
pub fn revsort_unchecked(a: *mut f64, ib: *mut ::std::os::raw::c_int,
n: ::std::os::raw::c_int);
#[doc = " Sort doubles with index array."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Pointer to double array (sorted in place)"]
#[doc = " - `indx`: Pointer to integer array (permuted alongside `x`)"]
#[doc = " - `n`: Number of elements"]
#[doc = "Unchecked FFI binding for `rsort_with_index`."]
#[doc = "Generated from source location line 2259, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "rsort_with_index"]
pub fn rsort_with_index_unchecked(x: *mut f64,
indx: *mut ::std::os::raw::c_int, n: ::std::os::raw::c_int);
#[doc = " Partial sort integers (moves k-th smallest to position k)."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Pointer to integer array"]
#[doc = " - `n`: Number of elements"]
#[doc = " - `k`: Target position (0-indexed)"]
#[doc(alias = "Rf_iPsort")]
#[doc = "Unchecked FFI binding for `iPsort`."]
#[doc = "Generated from source location line 2273, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "iPsort"]
pub fn iPsort_unchecked(x: *mut ::std::os::raw::c_int,
n: ::std::os::raw::c_int, k: ::std::os::raw::c_int);
#[doc = " Partial sort doubles (moves k-th smallest to position k)."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Pointer to double array"]
#[doc = " - `n`: Number of elements"]
#[doc = " - `k`: Target position (0-indexed)"]
#[doc(alias = "Rf_rPsort")]
#[doc = "Unchecked FFI binding for `rPsort`."]
#[doc = "Generated from source location line 2287, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "rPsort"]
pub fn rPsort_unchecked(x: *mut f64, n: ::std::os::raw::c_int,
k: ::std::os::raw::c_int);
#[doc = " Partial sort complex numbers."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Pointer to Rcomplex array"]
#[doc = " - `n`: Number of elements"]
#[doc = " - `k`: Target position (0-indexed)"]
#[doc(alias = "Rf_cPsort")]
#[doc = "Unchecked FFI binding for `cPsort`."]
#[doc = "Generated from source location line 2297, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "cPsort"]
pub fn cPsort_unchecked(x: *mut Rcomplex, n: ::std::os::raw::c_int,
k: ::std::os::raw::c_int);
#[doc = " Quicksort doubles in place."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `v`: Pointer to double array"]
#[doc = " - `i`: Start index (1-indexed for R compatibility)"]
#[doc = " - `j`: End index (1-indexed)"]
#[doc = "Unchecked FFI binding for `R_qsort`."]
#[doc = "Generated from source location line 2306, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_qsort"]
pub fn R_qsort_unchecked(v: *mut f64, i: usize, j: usize);
#[doc = " Quicksort doubles with index array."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `v`: Pointer to double array"]
#[doc = " - `indx`: Pointer to index array (permuted alongside v)"]
#[doc = " - `i`: Start index (1-indexed)"]
#[doc = " - `j`: End index (1-indexed)"]
#[doc = "Unchecked FFI binding for `R_qsort_I`."]
#[doc = "Generated from source location line 2316, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_qsort_I"]
pub fn R_qsort_I_unchecked(v: *mut f64, indx: *mut ::std::os::raw::c_int,
i: ::std::os::raw::c_int, j: ::std::os::raw::c_int);
#[doc = " Quicksort integers in place."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `iv`: Pointer to integer array"]
#[doc = " - `i`: Start index (1-indexed)"]
#[doc = " - `j`: End index (1-indexed)"]
#[doc = "Unchecked FFI binding for `R_qsort_int`."]
#[doc = "Generated from source location line 2330, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_qsort_int"]
pub fn R_qsort_int_unchecked(iv: *mut ::std::os::raw::c_int, i: usize,
j: usize);
#[doc = " Quicksort integers with index array."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `iv`: Pointer to integer array"]
#[doc = " - `indx`: Pointer to index array"]
#[doc = " - `i`: Start index (1-indexed)"]
#[doc = " - `j`: End index (1-indexed)"]
#[doc = "Unchecked FFI binding for `R_qsort_int_I`."]
#[doc = "Generated from source location line 2340, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_qsort_int_I"]
pub fn R_qsort_int_I_unchecked(iv: *mut ::std::os::raw::c_int,
indx: *mut ::std::os::raw::c_int, i: ::std::os::raw::c_int,
j: ::std::os::raw::c_int);
#[doc = " Expand a filename, resolving `~` and environment variables."]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc =
" Pointer to expanded path (in R\'s internal buffer, do not free)."]
#[doc = "Unchecked FFI binding for `R_ExpandFileName`."]
#[doc = "Generated from source location line 2352, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_ExpandFileName"]
pub fn R_ExpandFileName_unchecked(s: *const ::std::os::raw::c_char)
-> *const ::std::os::raw::c_char;
#[doc = " Convert string to double, always using \'.\' as decimal point."]
#[doc = ""]
#[doc = " Also accepts \"NA\" as input, returning NA_REAL."]
#[doc = "Unchecked FFI binding for `R_atof`."]
#[doc = "Generated from source location line 2357, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_atof"]
pub fn R_atof_unchecked(str: *const ::std::os::raw::c_char)
-> f64;
#[doc =
" Convert string to double with end pointer, using \'.\' as decimal point."]
#[doc = ""]
#[doc = " Like `strtod()` but locale-independent."]
#[doc = "Unchecked FFI binding for `R_strtod`."]
#[doc = "Generated from source location line 2362, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_strtod"]
pub fn R_strtod_unchecked(c: *const ::std::os::raw::c_char,
end: *mut *mut ::std::os::raw::c_char)
-> f64;
#[doc = " Generate a temporary filename."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `prefix`: Filename prefix"]
#[doc = " - `tempdir`: Directory for temp file"]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc = " Newly allocated string (must be freed with `R_free_tmpnam`)."]
#[doc = "Unchecked FFI binding for `R_tmpnam`."]
#[doc = "Generated from source location line 2375, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_tmpnam"]
pub fn R_tmpnam_unchecked(prefix: *const ::std::os::raw::c_char,
tempdir: *const ::std::os::raw::c_char)
-> *mut ::std::os::raw::c_char;
#[doc = " Generate a temporary filename with extension."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `prefix`: Filename prefix"]
#[doc = " - `tempdir`: Directory for temp file"]
#[doc = " - `fileext`: File extension (e.g., \".txt\")"]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc = " Newly allocated string (must be freed with `R_free_tmpnam`)."]
#[doc = "Unchecked FFI binding for `R_tmpnam2`."]
#[doc = "Generated from source location line 2391, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_tmpnam2"]
pub fn R_tmpnam2_unchecked(prefix: *const ::std::os::raw::c_char,
tempdir: *const ::std::os::raw::c_char,
fileext: *const ::std::os::raw::c_char)
-> *mut ::std::os::raw::c_char;
#[doc =
" Free a temporary filename allocated by `R_tmpnam` or `R_tmpnam2`."]
#[doc = "Unchecked FFI binding for `R_free_tmpnam`."]
#[doc = "Generated from source location line 2398, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_free_tmpnam"]
pub fn R_free_tmpnam_unchecked(name: *mut ::std::os::raw::c_char);
#[doc = " Check for R stack overflow."]
#[doc = ""]
#[doc = " Throws an R error if stack is nearly exhausted."]
#[doc = "Unchecked FFI binding for `R_CheckStack`."]
#[doc = "Generated from source location line 2403, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_CheckStack"]
pub fn R_CheckStack_unchecked();
#[doc = " Check for R stack overflow with extra space requirement."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `extra`: Additional bytes needed"]
#[doc = "Unchecked FFI binding for `R_CheckStack2`."]
#[doc = "Generated from source location line 2410, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_CheckStack2"]
pub fn R_CheckStack2_unchecked(extra: usize);
#[doc = " Find the interval containing a value (binary search)."]
#[doc = ""]
#[doc = " Used for interpolation and binning."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `xt`: Sorted breakpoints array"]
#[doc = " - `n`: Number of breakpoints"]
#[doc = " - `x`: Value to find"]
#[doc = " - `rightmost_closed`: If TRUE, rightmost interval is closed"]
#[doc = " - `all_inside`: If TRUE, out-of-bounds values map to endpoints"]
#[doc = " - `ilo`: Initial guess for interval (1-indexed)"]
#[doc = " - `mflag`: Output flag (see R documentation)"]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc = " Interval index (1-indexed)."]
#[doc = "Unchecked FFI binding for `findInterval`."]
#[doc = "Generated from source location line 2429, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "findInterval"]
pub fn findInterval_unchecked(xt: *const f64, n: ::std::os::raw::c_int,
x: f64, rightmost_closed: Rboolean, all_inside: Rboolean,
ilo: ::std::os::raw::c_int, mflag: *mut ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
#[doc = " Extended interval finding with left-open option."]
#[allow(clippy::too_many_arguments)]
#[doc = "Unchecked FFI binding for `findInterval2`."]
#[doc = "Generated from source location line 2441, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "findInterval2"]
pub fn findInterval2_unchecked(xt: *const f64, n: ::std::os::raw::c_int,
x: f64, rightmost_closed: Rboolean, all_inside: Rboolean,
left_open: Rboolean, ilo: ::std::os::raw::c_int,
mflag: *mut ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
#[doc = " Find column maxima in a matrix."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `matrix`: Column-major matrix data"]
#[doc = " - `nr`: Number of rows"]
#[doc = " - `nc`: Number of columns"]
#[doc = " - `maxes`: Output array for column maxima indices (1-indexed)"]
#[doc = " - `ties_meth`: How to handle ties (1=first, 2=random, 3=last)"]
#[doc = "Unchecked FFI binding for `R_max_col`."]
#[doc = "Generated from source location line 2461, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_max_col"]
pub fn R_max_col_unchecked(matrix: *const f64,
nr: *const ::std::os::raw::c_int, nc: *const ::std::os::raw::c_int,
maxes: *mut ::std::os::raw::c_int,
ties_meth: *const ::std::os::raw::c_int);
#[doc = " Check if a string represents FALSE in R."]
#[doc = ""]
#[doc = " Recognizes \"FALSE\", \"false\", \"False\", \"F\", \"f\", etc."]
#[doc(alias = "Rf_StringFalse")]
#[doc = "Unchecked FFI binding for `StringFalse`."]
#[doc = "Generated from source location line 2473, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "StringFalse"]
pub fn StringFalse_unchecked(s: *const ::std::os::raw::c_char)
-> Rboolean;
#[doc = " Check if a string represents TRUE in R."]
#[doc = ""]
#[doc = " Recognizes \"TRUE\", \"true\", \"True\", \"T\", \"t\", etc."]
#[doc(alias = "Rf_StringTrue")]
#[doc = "Unchecked FFI binding for `StringTrue`."]
#[doc = "Generated from source location line 2479, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "StringTrue"]
pub fn StringTrue_unchecked(s: *const ::std::os::raw::c_char)
-> Rboolean;
#[doc = " Check if a string is blank (empty or only whitespace)."]
#[doc(alias = "Rf_isBlankString")]
#[doc = "Unchecked FFI binding for `isBlankString`."]
#[doc = "Generated from source location line 2483, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "isBlankString"]
pub fn isBlankString_unchecked(s: *const ::std::os::raw::c_char)
-> Rboolean;
}
#[doc = " Sort an integer vector in place (ascending order)."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Pointer to integer array"]
#[doc = " - `n`: Number of elements"]
#[doc =
"Checked wrapper for `R_isort`. Calls `R_isort_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2224, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_isort(x: *mut ::std::os::raw::c_int,
n: ::std::os::raw::c_int) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_isort_unchecked(x, n)
})
});
result.0
}
#[doc = " Sort a double vector in place (ascending order)."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Pointer to double array"]
#[doc = " - `n`: Number of elements"]
#[doc =
"Checked wrapper for `R_rsort`. Calls `R_rsort_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2232, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_rsort(x: *mut f64, n: ::std::os::raw::c_int) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_rsort_unchecked(x, n)
})
});
result.0
}
#[doc = " Sort a complex vector in place."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Pointer to Rcomplex array"]
#[doc = " - `n`: Number of elements"]
#[doc =
"Checked wrapper for `R_csort`. Calls `R_csort_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2240, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_csort(x: *mut Rcomplex, n: ::std::os::raw::c_int) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_csort_unchecked(x, n)
})
});
result.0
}
#[doc = " Sort doubles in descending order, carrying along an index array."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `a`: Pointer to double array (sorted in place, descending)"]
#[doc = " - `ib`: Pointer to integer array (permuted alongside `a`)"]
#[doc = " - `n`: Number of elements"]
#[doc(alias = "Rf_revsort")]
#[doc =
"Checked wrapper for `revsort`. Calls `revsort_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2250, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn revsort(a: *mut f64, ib: *mut ::std::os::raw::c_int,
n: ::std::os::raw::c_int) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
revsort_unchecked(a, ib, n)
})
});
result.0
}
#[doc = " Sort doubles with index array."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Pointer to double array (sorted in place)"]
#[doc = " - `indx`: Pointer to integer array (permuted alongside `x`)"]
#[doc = " - `n`: Number of elements"]
#[doc =
"Checked wrapper for `rsort_with_index`. Calls `rsort_with_index_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2259, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn rsort_with_index(x: *mut f64, indx: *mut ::std::os::raw::c_int,
n: ::std::os::raw::c_int) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
rsort_with_index_unchecked(x, indx, n)
})
});
result.0
}
#[doc = " Partial sort integers (moves k-th smallest to position k)."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Pointer to integer array"]
#[doc = " - `n`: Number of elements"]
#[doc = " - `k`: Target position (0-indexed)"]
#[doc(alias = "Rf_iPsort")]
#[doc =
"Checked wrapper for `iPsort`. Calls `iPsort_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2273, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn iPsort(x: *mut ::std::os::raw::c_int, n: ::std::os::raw::c_int,
k: ::std::os::raw::c_int) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
iPsort_unchecked(x, n, k)
})
});
result.0
}
#[doc = " Partial sort doubles (moves k-th smallest to position k)."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Pointer to double array"]
#[doc = " - `n`: Number of elements"]
#[doc = " - `k`: Target position (0-indexed)"]
#[doc(alias = "Rf_rPsort")]
#[doc =
"Checked wrapper for `rPsort`. Calls `rPsort_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2287, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn rPsort(x: *mut f64, n: ::std::os::raw::c_int,
k: ::std::os::raw::c_int) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
rPsort_unchecked(x, n, k)
})
});
result.0
}
#[doc = " Partial sort complex numbers."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Pointer to Rcomplex array"]
#[doc = " - `n`: Number of elements"]
#[doc = " - `k`: Target position (0-indexed)"]
#[doc(alias = "Rf_cPsort")]
#[doc =
"Checked wrapper for `cPsort`. Calls `cPsort_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2297, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn cPsort(x: *mut Rcomplex, n: ::std::os::raw::c_int,
k: ::std::os::raw::c_int) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
cPsort_unchecked(x, n, k)
})
});
result.0
}
#[doc = " Quicksort doubles in place."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `v`: Pointer to double array"]
#[doc = " - `i`: Start index (1-indexed for R compatibility)"]
#[doc = " - `j`: End index (1-indexed)"]
#[doc =
"Checked wrapper for `R_qsort`. Calls `R_qsort_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2306, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_qsort(v: *mut f64, i: usize, j: usize) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_qsort_unchecked(v, i, j)
})
});
result.0
}
#[doc = " Quicksort doubles with index array."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `v`: Pointer to double array"]
#[doc = " - `indx`: Pointer to index array (permuted alongside v)"]
#[doc = " - `i`: Start index (1-indexed)"]
#[doc = " - `j`: End index (1-indexed)"]
#[doc =
"Checked wrapper for `R_qsort_I`. Calls `R_qsort_I_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2316, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_qsort_I(v: *mut f64, indx: *mut ::std::os::raw::c_int,
i: ::std::os::raw::c_int, j: ::std::os::raw::c_int) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_qsort_I_unchecked(v, indx, i, j)
})
});
result.0
}
#[doc = " Quicksort integers in place."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `iv`: Pointer to integer array"]
#[doc = " - `i`: Start index (1-indexed)"]
#[doc = " - `j`: End index (1-indexed)"]
#[doc =
"Checked wrapper for `R_qsort_int`. Calls `R_qsort_int_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2330, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_qsort_int(iv: *mut ::std::os::raw::c_int, i: usize,
j: usize) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_qsort_int_unchecked(iv, i, j)
})
});
result.0
}
#[doc = " Quicksort integers with index array."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `iv`: Pointer to integer array"]
#[doc = " - `indx`: Pointer to index array"]
#[doc = " - `i`: Start index (1-indexed)"]
#[doc = " - `j`: End index (1-indexed)"]
#[doc =
"Checked wrapper for `R_qsort_int_I`. Calls `R_qsort_int_I_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2340, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_qsort_int_I(iv: *mut ::std::os::raw::c_int,
indx: *mut ::std::os::raw::c_int, i: ::std::os::raw::c_int,
j: ::std::os::raw::c_int) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_qsort_int_I_unchecked(iv, indx, i, j)
})
});
result.0
}
#[doc = " Expand a filename, resolving `~` and environment variables."]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc = " Pointer to expanded path (in R\'s internal buffer, do not free)."]
#[doc =
"Checked wrapper for `R_ExpandFileName`. Calls `R_ExpandFileName_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2352, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_ExpandFileName(s: *const ::std::os::raw::c_char)
-> *const ::std::os::raw::c_char {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_ExpandFileName_unchecked(s)
})
});
result.0
}
#[doc = " Convert string to double, always using \'.\' as decimal point."]
#[doc = ""]
#[doc = " Also accepts \"NA\" as input, returning NA_REAL."]
#[doc =
"Checked wrapper for `R_atof`. Calls `R_atof_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2357, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_atof(str: *const ::std::os::raw::c_char) -> f64 {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_atof_unchecked(str)
})
});
result.0
}
#[doc =
" Convert string to double with end pointer, using \'.\' as decimal point."]
#[doc = ""]
#[doc = " Like `strtod()` but locale-independent."]
#[doc =
"Checked wrapper for `R_strtod`. Calls `R_strtod_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2362, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_strtod(c: *const ::std::os::raw::c_char,
end: *mut *mut ::std::os::raw::c_char) -> f64 {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_strtod_unchecked(c, end)
})
});
result.0
}
#[doc = " Generate a temporary filename."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `prefix`: Filename prefix"]
#[doc = " - `tempdir`: Directory for temp file"]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc = " Newly allocated string (must be freed with `R_free_tmpnam`)."]
#[doc =
"Checked wrapper for `R_tmpnam`. Calls `R_tmpnam_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2375, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_tmpnam(prefix: *const ::std::os::raw::c_char,
tempdir: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_tmpnam_unchecked(prefix, tempdir)
})
});
result.0
}
#[doc = " Generate a temporary filename with extension."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `prefix`: Filename prefix"]
#[doc = " - `tempdir`: Directory for temp file"]
#[doc = " - `fileext`: File extension (e.g., \".txt\")"]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc = " Newly allocated string (must be freed with `R_free_tmpnam`)."]
#[doc =
"Checked wrapper for `R_tmpnam2`. Calls `R_tmpnam2_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2391, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_tmpnam2(prefix: *const ::std::os::raw::c_char,
tempdir: *const ::std::os::raw::c_char,
fileext: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_tmpnam2_unchecked(prefix, tempdir, fileext)
})
});
result.0
}
#[doc = " Free a temporary filename allocated by `R_tmpnam` or `R_tmpnam2`."]
#[doc =
"Checked wrapper for `R_free_tmpnam`. Calls `R_free_tmpnam_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2398, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_free_tmpnam(name: *mut ::std::os::raw::c_char) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_free_tmpnam_unchecked(name)
})
});
result.0
}
#[doc = " Check for R stack overflow."]
#[doc = ""]
#[doc = " Throws an R error if stack is nearly exhausted."]
#[doc =
"Checked wrapper for `R_CheckStack`. Calls `R_CheckStack_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2403, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_CheckStack() {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_CheckStack_unchecked()
})
});
result.0
}
#[doc = " Check for R stack overflow with extra space requirement."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `extra`: Additional bytes needed"]
#[doc =
"Checked wrapper for `R_CheckStack2`. Calls `R_CheckStack2_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2410, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_CheckStack2(extra: usize) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_CheckStack2_unchecked(extra)
})
});
result.0
}
#[doc = " Find the interval containing a value (binary search)."]
#[doc = ""]
#[doc = " Used for interpolation and binning."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `xt`: Sorted breakpoints array"]
#[doc = " - `n`: Number of breakpoints"]
#[doc = " - `x`: Value to find"]
#[doc = " - `rightmost_closed`: If TRUE, rightmost interval is closed"]
#[doc = " - `all_inside`: If TRUE, out-of-bounds values map to endpoints"]
#[doc = " - `ilo`: Initial guess for interval (1-indexed)"]
#[doc = " - `mflag`: Output flag (see R documentation)"]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc = " Interval index (1-indexed)."]
#[doc =
"Checked wrapper for `findInterval`. Calls `findInterval_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2429, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn findInterval(xt: *const f64, n: ::std::os::raw::c_int, x: f64,
rightmost_closed: Rboolean, all_inside: Rboolean,
ilo: ::std::os::raw::c_int, mflag: *mut ::std::os::raw::c_int)
-> ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
findInterval_unchecked(xt, n, x, rightmost_closed,
all_inside, ilo, mflag)
})
});
result.0
}
#[doc = " Extended interval finding with left-open option."]
#[allow(clippy::too_many_arguments)]
#[doc =
"Checked wrapper for `findInterval2`. Calls `findInterval2_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2441, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn findInterval2(xt: *const f64, n: ::std::os::raw::c_int, x: f64,
rightmost_closed: Rboolean, all_inside: Rboolean, left_open: Rboolean,
ilo: ::std::os::raw::c_int, mflag: *mut ::std::os::raw::c_int)
-> ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
findInterval2_unchecked(xt, n, x, rightmost_closed,
all_inside, left_open, ilo, mflag)
})
});
result.0
}
#[doc = " Find column maxima in a matrix."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `matrix`: Column-major matrix data"]
#[doc = " - `nr`: Number of rows"]
#[doc = " - `nc`: Number of columns"]
#[doc = " - `maxes`: Output array for column maxima indices (1-indexed)"]
#[doc = " - `ties_meth`: How to handle ties (1=first, 2=random, 3=last)"]
#[doc =
"Checked wrapper for `R_max_col`. Calls `R_max_col_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2461, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_max_col(matrix: *const f64, nr: *const ::std::os::raw::c_int,
nc: *const ::std::os::raw::c_int, maxes: *mut ::std::os::raw::c_int,
ties_meth: *const ::std::os::raw::c_int) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_max_col_unchecked(matrix, nr, nc, maxes, ties_meth)
})
});
result.0
}
#[doc = " Check if a string represents FALSE in R."]
#[doc = ""]
#[doc = " Recognizes \"FALSE\", \"false\", \"False\", \"F\", \"f\", etc."]
#[doc(alias = "Rf_StringFalse")]
#[doc =
"Checked wrapper for `StringFalse`. Calls `StringFalse_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2473, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn StringFalse(s: *const ::std::os::raw::c_char) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
StringFalse_unchecked(s)
})
});
result.0
}
#[doc = " Check if a string represents TRUE in R."]
#[doc = ""]
#[doc = " Recognizes \"TRUE\", \"true\", \"True\", \"T\", \"t\", etc."]
#[doc(alias = "Rf_StringTrue")]
#[doc =
"Checked wrapper for `StringTrue`. Calls `StringTrue_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2479, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn StringTrue(s: *const ::std::os::raw::c_char) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
StringTrue_unchecked(s)
})
});
result.0
}
#[doc = " Check if a string is blank (empty or only whitespace)."]
#[doc(alias = "Rf_isBlankString")]
#[doc =
"Checked wrapper for `isBlankString`. Calls `isBlankString_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2483, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn isBlankString(s: *const ::std::os::raw::c_char) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
isBlankString_unchecked(s)
})
});
result.0
}#[r_ffi_checked]
2217unsafe extern "C-unwind" {
2218 pub fn R_isort(x: *mut ::std::os::raw::c_int, n: ::std::os::raw::c_int);
2225
2226 pub fn R_rsort(x: *mut f64, n: ::std::os::raw::c_int);
2233
2234 pub fn R_csort(x: *mut Rcomplex, n: ::std::os::raw::c_int);
2241
2242 #[doc(alias = "Rf_revsort")]
2250 pub fn revsort(a: *mut f64, ib: *mut ::std::os::raw::c_int, n: ::std::os::raw::c_int);
2251
2252 pub fn rsort_with_index(
2260 x: *mut f64,
2261 indx: *mut ::std::os::raw::c_int,
2262 n: ::std::os::raw::c_int,
2263 );
2264
2265 #[doc(alias = "Rf_iPsort")]
2273 pub fn iPsort(
2274 x: *mut ::std::os::raw::c_int,
2275 n: ::std::os::raw::c_int,
2276 k: ::std::os::raw::c_int,
2277 );
2278
2279 #[doc(alias = "Rf_rPsort")]
2287 pub fn rPsort(x: *mut f64, n: ::std::os::raw::c_int, k: ::std::os::raw::c_int);
2288
2289 #[doc(alias = "Rf_cPsort")]
2297 pub fn cPsort(x: *mut Rcomplex, n: ::std::os::raw::c_int, k: ::std::os::raw::c_int);
2298
2299 pub fn R_qsort(v: *mut f64, i: usize, j: usize);
2307
2308 pub fn R_qsort_I(
2317 v: *mut f64,
2318 indx: *mut ::std::os::raw::c_int,
2319 i: ::std::os::raw::c_int,
2320 j: ::std::os::raw::c_int,
2321 );
2322
2323 pub fn R_qsort_int(iv: *mut ::std::os::raw::c_int, i: usize, j: usize);
2331
2332 pub fn R_qsort_int_I(
2341 iv: *mut ::std::os::raw::c_int,
2342 indx: *mut ::std::os::raw::c_int,
2343 i: ::std::os::raw::c_int,
2344 j: ::std::os::raw::c_int,
2345 );
2346
2347 pub fn R_ExpandFileName(s: *const ::std::os::raw::c_char) -> *const ::std::os::raw::c_char;
2353
2354 pub fn R_atof(str: *const ::std::os::raw::c_char) -> f64;
2358
2359 pub fn R_strtod(c: *const ::std::os::raw::c_char, end: *mut *mut ::std::os::raw::c_char)
2363 -> f64;
2364
2365 pub fn R_tmpnam(
2376 prefix: *const ::std::os::raw::c_char,
2377 tempdir: *const ::std::os::raw::c_char,
2378 ) -> *mut ::std::os::raw::c_char;
2379
2380 pub fn R_tmpnam2(
2392 prefix: *const ::std::os::raw::c_char,
2393 tempdir: *const ::std::os::raw::c_char,
2394 fileext: *const ::std::os::raw::c_char,
2395 ) -> *mut ::std::os::raw::c_char;
2396
2397 pub fn R_free_tmpnam(name: *mut ::std::os::raw::c_char);
2399
2400 pub fn R_CheckStack();
2404
2405 pub fn R_CheckStack2(extra: usize);
2411
2412 pub fn findInterval(
2430 xt: *const f64,
2431 n: ::std::os::raw::c_int,
2432 x: f64,
2433 rightmost_closed: Rboolean,
2434 all_inside: Rboolean,
2435 ilo: ::std::os::raw::c_int,
2436 mflag: *mut ::std::os::raw::c_int,
2437 ) -> ::std::os::raw::c_int;
2438
2439 #[allow(clippy::too_many_arguments)]
2441 pub fn findInterval2(
2442 xt: *const f64,
2443 n: ::std::os::raw::c_int,
2444 x: f64,
2445 rightmost_closed: Rboolean,
2446 all_inside: Rboolean,
2447 left_open: Rboolean,
2448 ilo: ::std::os::raw::c_int,
2449 mflag: *mut ::std::os::raw::c_int,
2450 ) -> ::std::os::raw::c_int;
2451
2452 pub fn R_max_col(
2462 matrix: *const f64,
2463 nr: *const ::std::os::raw::c_int,
2464 nc: *const ::std::os::raw::c_int,
2465 maxes: *mut ::std::os::raw::c_int,
2466 ties_meth: *const ::std::os::raw::c_int,
2467 );
2468
2469 #[doc(alias = "Rf_StringFalse")]
2473 pub fn StringFalse(s: *const ::std::os::raw::c_char) -> Rboolean;
2474
2475 #[doc(alias = "Rf_StringTrue")]
2479 pub fn StringTrue(s: *const ::std::os::raw::c_char) -> Rboolean;
2480
2481 #[doc(alias = "Rf_isBlankString")]
2483 pub fn isBlankString(s: *const ::std::os::raw::c_char) -> Rboolean;
2484}
2485
2486unsafe extern "C-unwind" {
#[doc = " Create a CHARSXP with specified encoding."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `s`: C string"]
#[doc = " - `encoding`: Character encoding (CE_UTF8, CE_LATIN1, etc.)"]
#[doc(alias = "mkCharCE")]
#[doc = "Unchecked FFI binding for `Rf_mkCharCE`."]
#[doc = "Generated from source location line 2502, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_mkCharCE"]
pub(crate) fn Rf_mkCharCE_unchecked(s: *const ::std::os::raw::c_char,
encoding: cetype_t)
-> SEXP;
#[doc = " Get the number of characters in a string/character."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: A string SEXP"]
#[doc = " - `ntype`: Type of count (0=bytes, 1=chars, 2=width)"]
#[doc = " - `allowNA`: Whether to allow NA values"]
#[doc = " - `keepNA`: Whether to keep NA in result"]
#[doc = " - `msg_name`: Name for error messages"]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc = " Character count or -1 on error."]
#[doc = "Unchecked FFI binding for `R_nchar`."]
#[doc = "Generated from source location line 2517, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_nchar"]
pub fn R_nchar_unchecked(x: SEXP, ntype: ::std::os::raw::c_int,
allowNA: Rboolean, keepNA: Rboolean,
msg_name: *const ::std::os::raw::c_char)
-> ::std::os::raw::c_int;
#[doc = " Convert SEXPTYPE to C string name."]
#[doc = ""]
#[doc = " Returns a string like \"INTSXP\", \"REALSXP\", etc."]
#[doc(alias = "type2char")]
#[doc = "Unchecked FFI binding for `Rf_type2char`."]
#[doc = "Generated from source location line 2529, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_type2char"]
pub fn Rf_type2char_unchecked(sexptype: SEXPTYPE)
-> *const ::std::os::raw::c_char;
#[doc = " Print an R value to the console."]
#[doc = ""]
#[doc = " Uses R\'s standard print method for the object."]
#[doc(alias = "PrintValue")]
#[doc = "Unchecked FFI binding for `Rf_PrintValue`."]
#[doc = "Generated from source location line 2535, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_PrintValue"]
pub fn Rf_PrintValue_unchecked(x: SEXP);
#[doc = " Create a new environment."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `enclos`: Enclosing environment"]
#[doc = " - `hash`: Whether to use a hash table"]
#[doc = " - `size`: Initial hash table size (if hash is TRUE)"]
#[doc = "Unchecked FFI binding for `R_NewEnv`."]
#[doc = "Generated from source location line 2547, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_NewEnv"]
pub(crate) fn R_NewEnv_unchecked(enclos: SEXP, hash: Rboolean,
size: ::std::os::raw::c_int)
-> SEXP;
#[doc = " Check if a variable exists in an environment frame."]
#[doc = ""]
#[doc = " Does not search enclosing environments."]
#[doc = "Unchecked FFI binding for `R_existsVarInFrame`."]
#[doc = "Generated from source location line 2552, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_existsVarInFrame"]
pub fn R_existsVarInFrame_unchecked(rho: SEXP, symbol: SEXP)
-> Rboolean;
#[doc = " Remove a variable from an environment frame."]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc = " The removed value, or R_NilValue if not found."]
#[doc = "Unchecked FFI binding for `R_removeVarFromFrame`."]
#[doc = "Generated from source location line 2559, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_removeVarFromFrame"]
pub fn R_removeVarFromFrame_unchecked(symbol: SEXP, env: SEXP)
-> SEXP;
#[doc = " Get the top-level environment."]
#[doc = ""]
#[doc = " Walks up enclosing environments until reaching a top-level env"]
#[doc = " (global, namespace, or base)."]
#[doc(alias = "topenv")]
#[doc = "Unchecked FFI binding for `Rf_topenv`."]
#[doc = "Generated from source location line 2566, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_topenv"]
pub fn Rf_topenv_unchecked(target: SEXP, envir: SEXP)
-> SEXP;
#[doc = " Match elements of first vector in second vector."]
#[doc = ""]
#[doc = " Like R\'s `match()` function."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Vector of values to match"]
#[doc = " - `table`: Vector to match against"]
#[doc = " - `nomatch`: Value to return for non-matches"]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc =
" Integer vector of match positions (1-indexed, nomatch for non-matches)."]
#[doc(alias = "match")]
#[doc = "Unchecked FFI binding for `Rf_match`."]
#[doc = "Generated from source location line 2584, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_match"]
pub fn Rf_match_unchecked(x: SEXP, table: SEXP,
nomatch: ::std::os::raw::c_int)
-> SEXP;
#[doc = " Copy most attributes from source to target."]
#[doc = ""]
#[doc = " Copies all attributes except names, dim, and dimnames."]
#[doc(alias = "copyMostAttrib")]
#[doc = "Unchecked FFI binding for `Rf_copyMostAttrib`."]
#[doc = "Generated from source location line 2592, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_copyMostAttrib"]
pub fn Rf_copyMostAttrib_unchecked(source: SEXP, target: SEXP);
#[doc = " Find first duplicated element."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Vector to search"]
#[doc = " - `fromLast`: If TRUE, search from end"]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc =
" 0 if no duplicates, otherwise 1-indexed position of first duplicate."]
#[doc(alias = "any_duplicated")]
#[doc = "Unchecked FFI binding for `Rf_any_duplicated`."]
#[doc = "Generated from source location line 2605, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_any_duplicated"]
pub fn Rf_any_duplicated_unchecked(x: SEXP, fromLast: Rboolean)
-> R_xlen_t;
#[doc = " Convert to an S4 object."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `object`: Object to convert"]
#[doc = " - `flag`: Conversion flag"]
#[doc(alias = "asS4")]
#[doc = "Unchecked FFI binding for `Rf_asS4`."]
#[doc = "Generated from source location line 2616, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_asS4"]
pub fn Rf_asS4_unchecked(object: SEXP, flag: Rboolean,
complete: ::std::os::raw::c_int)
-> SEXP;
#[doc = " Get the S3 class of an S4 object."]
#[doc(alias = "S3Class")]
#[doc = "Unchecked FFI binding for `Rf_S3Class`."]
#[doc = "Generated from source location line 2620, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_S3Class"]
pub fn Rf_S3Class_unchecked(object: SEXP)
-> SEXP;
#[doc = " Get an R option value."]
#[doc = ""]
#[doc = " Equivalent to `getOption(\"name\")` in R."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `tag`: Symbol for option name"]
#[doc(alias = "GetOption1")]
#[doc = "Unchecked FFI binding for `Rf_GetOption1`."]
#[doc = "Generated from source location line 2632, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_GetOption1"]
pub fn Rf_GetOption1_unchecked(tag: SEXP)
-> SEXP;
#[doc = " Get the `digits` option."]
#[doc = ""]
#[doc = " Returns the value of `getOption(\"digits\")`."]
#[doc(alias = "GetOptionDigits")]
#[doc = "Unchecked FFI binding for `Rf_GetOptionDigits`."]
#[doc = "Generated from source location line 2638, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_GetOptionDigits"]
pub fn Rf_GetOptionDigits_unchecked()
-> ::std::os::raw::c_int;
#[doc = " Get the `width` option."]
#[doc = ""]
#[doc = " Returns the value of `getOption(\"width\")`."]
#[doc(alias = "GetOptionWidth")]
#[doc = "Unchecked FFI binding for `Rf_GetOptionWidth`."]
#[doc = "Generated from source location line 2644, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_GetOptionWidth"]
pub(crate) fn Rf_GetOptionWidth_unchecked()
-> ::std::os::raw::c_int;
#[doc = " Check if a factor is ordered."]
#[doc(alias = "isOrdered")]
#[doc = "Unchecked FFI binding for `Rf_isOrdered`."]
#[doc = "Generated from source location line 2650, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isOrdered"]
pub fn Rf_isOrdered_unchecked(s: SEXP)
-> Rboolean;
#[doc = " Check if a factor is unordered."]
#[doc(alias = "isUnordered")]
#[doc = "Unchecked FFI binding for `Rf_isUnordered`."]
#[doc = "Generated from source location line 2654, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isUnordered"]
pub fn Rf_isUnordered_unchecked(s: SEXP)
-> Rboolean;
#[doc = " Check if a vector is unsorted."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Vector to check"]
#[doc = " - `strictly`: If TRUE, check for strictly increasing"]
#[doc(alias = "isUnsorted")]
#[doc = "Unchecked FFI binding for `Rf_isUnsorted`."]
#[doc = "Generated from source location line 2663, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_isUnsorted"]
pub fn Rf_isUnsorted_unchecked(x: SEXP, strictly: Rboolean)
-> ::std::os::raw::c_int;
#[doc = " Substitute in an expression."]
#[doc = ""]
#[doc = " Like R\'s `substitute()` function."]
#[doc(alias = "substitute")]
#[doc = "Unchecked FFI binding for `Rf_substitute`."]
#[doc = "Generated from source location line 2671, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_substitute"]
pub fn Rf_substitute_unchecked(lang: SEXP, rho: SEXP)
-> SEXP;
#[doc = " Set vector length."]
#[doc = ""]
#[doc = " For short vectors (length < 2^31)."]
#[doc(alias = "lengthgets")]
#[doc = "Unchecked FFI binding for `Rf_lengthgets`."]
#[doc = "Generated from source location line 2677, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_lengthgets"]
pub fn Rf_lengthgets_unchecked(x: SEXP, newlen: R_xlen_t)
-> SEXP;
#[doc = " Set vector length (long vector version)."]
#[doc(alias = "xlengthgets")]
#[doc = "Unchecked FFI binding for `Rf_xlengthgets`."]
#[doc = "Generated from source location line 2681, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_xlengthgets"]
pub fn Rf_xlengthgets_unchecked(x: SEXP, newlen: R_xlen_t)
-> SEXP;
#[doc =
" Protect a SEXP and record its stack index for later `R_Reprotect`."]
#[doc = ""]
#[doc =
" **Cost: O(1)** — same array write as `Rf_protect`, plus stores the index."]
#[doc =
" No allocation. Use when you need to replace a protected value in-place"]
#[doc =
" (e.g., inside a loop that allocates) without unprotect/re-protect churn."]
#[doc(alias = "PROTECT_WITH_INDEX")]
#[doc = "Unchecked FFI binding for `R_ProtectWithIndex`."]
#[doc = "Generated from source location line 2691, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_ProtectWithIndex"]
pub fn R_ProtectWithIndex_unchecked(s: SEXP,
index: *mut ::std::os::raw::c_int);
#[doc = " Replace the SEXP at a previously recorded protect stack index."]
#[doc = ""]
#[doc =
" **Cost: O(1)** — direct array write (`R_PPStack[index] = s`). No allocation."]
#[doc = ""]
#[doc = " # Safety"]
#[doc = ""]
#[doc =
" `index` must be from a previous `R_ProtectWithIndex` call and the"]
#[doc = " stack must not have been unprotected past that index."]
#[doc(alias = "REPROTECT")]
#[doc = "Unchecked FFI binding for `R_Reprotect`."]
#[doc = "Generated from source location line 2702, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_Reprotect"]
pub fn R_Reprotect_unchecked(s: SEXP, index: ::std::os::raw::c_int);
#[doc = " Create a weak reference."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `key`: The key object (weak reference target)"]
#[doc = " - `val`: The value to associate"]
#[doc = " - `fin`: Finalizer function (or R_NilValue)"]
#[doc = " - `onexit`: Whether to run finalizer on R exit"]
#[doc = "Unchecked FFI binding for `R_MakeWeakRef`."]
#[doc = "Generated from source location line 2714, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_MakeWeakRef"]
pub fn R_MakeWeakRef_unchecked(key: SEXP, val: SEXP, fin: SEXP,
onexit: Rboolean)
-> SEXP;
#[doc = " Create a weak reference with C finalizer."]
#[doc = "Unchecked FFI binding for `R_MakeWeakRefC`."]
#[doc = "Generated from source location line 2717, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_MakeWeakRefC"]
pub fn R_MakeWeakRefC_unchecked(key: SEXP, val: SEXP, fin: R_CFinalizer_t,
onexit: Rboolean)
-> SEXP;
#[doc = " Get the key from a weak reference."]
#[doc = "Unchecked FFI binding for `R_WeakRefKey`."]
#[doc = "Generated from source location line 2720, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_WeakRefKey"]
pub fn R_WeakRefKey_unchecked(w: SEXP)
-> SEXP;
#[doc = " Get the value from a weak reference."]
#[doc = "Unchecked FFI binding for `R_WeakRefValue`."]
#[doc = "Generated from source location line 2723, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_WeakRefValue"]
pub fn R_WeakRefValue_unchecked(w: SEXP)
-> SEXP;
#[doc = " Run pending finalizers."]
#[doc = "Unchecked FFI binding for `R_RunPendingFinalizers`."]
#[doc = "Generated from source location line 2726, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "R_RunPendingFinalizers"]
pub fn R_RunPendingFinalizers_unchecked();
#[doc = " Convert a pairlist to a generic vector (list)."]
#[doc(alias = "PairToVectorList")]
#[doc = "Unchecked FFI binding for `Rf_PairToVectorList`."]
#[doc = "Generated from source location line 2732, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_PairToVectorList"]
pub fn Rf_PairToVectorList_unchecked(x: SEXP)
-> SEXP;
#[doc = " Convert a generic vector (list) to a pairlist."]
#[doc(alias = "VectorToPairList")]
#[doc = "Unchecked FFI binding for `Rf_VectorToPairList`."]
#[doc = "Generated from source location line 2736, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_VectorToPairList"]
pub fn Rf_VectorToPairList_unchecked(x: SEXP)
-> SEXP;
#[doc = " Install a symbol from a CHARSXP."]
#[doc = ""]
#[doc = " Like `Rf_install()` but takes a CHARSXP instead of C string."]
#[doc(alias = "installChar")]
#[doc = "Unchecked FFI binding for `Rf_installChar`."]
#[doc = "Generated from source location line 2744, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "Rf_installChar"]
pub fn Rf_installChar_unchecked(x: SEXP)
-> SEXP;
}
#[doc = " Create a CHARSXP with specified encoding."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `s`: C string"]
#[doc = " - `encoding`: Character encoding (CE_UTF8, CE_LATIN1, etc.)"]
#[doc(alias = "mkCharCE")]
#[doc =
"Checked wrapper for `Rf_mkCharCE`. Calls `Rf_mkCharCE_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2502, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn Rf_mkCharCE(s: *const ::std::os::raw::c_char,
encoding: cetype_t) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_mkCharCE_unchecked(s, encoding)
})
});
result.0
}
#[doc = " Get the number of characters in a string/character."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: A string SEXP"]
#[doc = " - `ntype`: Type of count (0=bytes, 1=chars, 2=width)"]
#[doc = " - `allowNA`: Whether to allow NA values"]
#[doc = " - `keepNA`: Whether to keep NA in result"]
#[doc = " - `msg_name`: Name for error messages"]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc = " Character count or -1 on error."]
#[doc =
"Checked wrapper for `R_nchar`. Calls `R_nchar_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2517, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_nchar(x: SEXP, ntype: ::std::os::raw::c_int,
allowNA: Rboolean, keepNA: Rboolean,
msg_name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_nchar_unchecked(x, ntype, allowNA, keepNA, msg_name)
})
});
result.0
}
#[doc = " Convert SEXPTYPE to C string name."]
#[doc = ""]
#[doc = " Returns a string like \"INTSXP\", \"REALSXP\", etc."]
#[doc(alias = "type2char")]
#[doc =
"Checked wrapper for `Rf_type2char`. Calls `Rf_type2char_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2529, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_type2char(sexptype: SEXPTYPE)
-> *const ::std::os::raw::c_char {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_type2char_unchecked(sexptype)
})
});
result.0
}
#[doc = " Print an R value to the console."]
#[doc = ""]
#[doc = " Uses R\'s standard print method for the object."]
#[doc(alias = "PrintValue")]
#[doc =
"Checked wrapper for `Rf_PrintValue`. Calls `Rf_PrintValue_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2535, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_PrintValue(x: SEXP) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_PrintValue_unchecked(x)
})
});
result.0
}
#[doc = " Create a new environment."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `enclos`: Enclosing environment"]
#[doc = " - `hash`: Whether to use a hash table"]
#[doc = " - `size`: Initial hash table size (if hash is TRUE)"]
#[doc =
"Checked wrapper for `R_NewEnv`. Calls `R_NewEnv_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2547, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_NewEnv(enclos: SEXP, hash: Rboolean,
size: ::std::os::raw::c_int) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_NewEnv_unchecked(enclos, hash, size)
})
});
result.0
}
#[doc = " Check if a variable exists in an environment frame."]
#[doc = ""]
#[doc = " Does not search enclosing environments."]
#[doc =
"Checked wrapper for `R_existsVarInFrame`. Calls `R_existsVarInFrame_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2552, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_existsVarInFrame(rho: SEXP, symbol: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_existsVarInFrame_unchecked(rho, symbol)
})
});
result.0
}
#[doc = " Remove a variable from an environment frame."]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc = " The removed value, or R_NilValue if not found."]
#[doc =
"Checked wrapper for `R_removeVarFromFrame`. Calls `R_removeVarFromFrame_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2559, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_removeVarFromFrame(symbol: SEXP, env: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_removeVarFromFrame_unchecked(symbol, env)
})
});
result.0
}
#[doc = " Get the top-level environment."]
#[doc = ""]
#[doc = " Walks up enclosing environments until reaching a top-level env"]
#[doc = " (global, namespace, or base)."]
#[doc(alias = "topenv")]
#[doc =
"Checked wrapper for `Rf_topenv`. Calls `Rf_topenv_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2566, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_topenv(target: SEXP, envir: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_topenv_unchecked(target, envir)
})
});
result.0
}
#[doc = " Match elements of first vector in second vector."]
#[doc = ""]
#[doc = " Like R\'s `match()` function."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Vector of values to match"]
#[doc = " - `table`: Vector to match against"]
#[doc = " - `nomatch`: Value to return for non-matches"]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc =
" Integer vector of match positions (1-indexed, nomatch for non-matches)."]
#[doc(alias = "match")]
#[doc =
"Checked wrapper for `Rf_match`. Calls `Rf_match_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2584, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_match(x: SEXP, table: SEXP, nomatch: ::std::os::raw::c_int)
-> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_match_unchecked(x, table, nomatch)
})
});
result.0
}
#[doc = " Copy most attributes from source to target."]
#[doc = ""]
#[doc = " Copies all attributes except names, dim, and dimnames."]
#[doc(alias = "copyMostAttrib")]
#[doc =
"Checked wrapper for `Rf_copyMostAttrib`. Calls `Rf_copyMostAttrib_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2592, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_copyMostAttrib(source: SEXP, target: SEXP) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_copyMostAttrib_unchecked(source, target)
})
});
result.0
}
#[doc = " Find first duplicated element."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Vector to search"]
#[doc = " - `fromLast`: If TRUE, search from end"]
#[doc = ""]
#[doc = " # Returns"]
#[doc = ""]
#[doc =
" 0 if no duplicates, otherwise 1-indexed position of first duplicate."]
#[doc(alias = "any_duplicated")]
#[doc =
"Checked wrapper for `Rf_any_duplicated`. Calls `Rf_any_duplicated_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2605, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_any_duplicated(x: SEXP, fromLast: Rboolean) -> R_xlen_t {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_any_duplicated_unchecked(x, fromLast)
})
});
result.0
}
#[doc = " Convert to an S4 object."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `object`: Object to convert"]
#[doc = " - `flag`: Conversion flag"]
#[doc(alias = "asS4")]
#[doc =
"Checked wrapper for `Rf_asS4`. Calls `Rf_asS4_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2616, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_asS4(object: SEXP, flag: Rboolean,
complete: ::std::os::raw::c_int) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_asS4_unchecked(object, flag, complete)
})
});
result.0
}
#[doc = " Get the S3 class of an S4 object."]
#[doc(alias = "S3Class")]
#[doc =
"Checked wrapper for `Rf_S3Class`. Calls `Rf_S3Class_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2620, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_S3Class(object: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_S3Class_unchecked(object)
})
});
result.0
}
#[doc = " Get an R option value."]
#[doc = ""]
#[doc = " Equivalent to `getOption(\"name\")` in R."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `tag`: Symbol for option name"]
#[doc(alias = "GetOption1")]
#[doc =
"Checked wrapper for `Rf_GetOption1`. Calls `Rf_GetOption1_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2632, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_GetOption1(tag: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_GetOption1_unchecked(tag)
})
});
result.0
}
#[doc = " Get the `digits` option."]
#[doc = ""]
#[doc = " Returns the value of `getOption(\"digits\")`."]
#[doc(alias = "GetOptionDigits")]
#[doc =
"Checked wrapper for `Rf_GetOptionDigits`. Calls `Rf_GetOptionDigits_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2638, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_GetOptionDigits() -> ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_GetOptionDigits_unchecked()
})
});
result.0
}
#[doc = " Get the `width` option."]
#[doc = ""]
#[doc = " Returns the value of `getOption(\"width\")`."]
#[doc(alias = "GetOptionWidth")]
#[doc =
"Checked wrapper for `Rf_GetOptionWidth`. Calls `Rf_GetOptionWidth_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2644, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn Rf_GetOptionWidth() -> ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_GetOptionWidth_unchecked()
})
});
result.0
}
#[doc = " Check if a factor is ordered."]
#[doc(alias = "isOrdered")]
#[doc =
"Checked wrapper for `Rf_isOrdered`. Calls `Rf_isOrdered_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2650, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isOrdered(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isOrdered_unchecked(s)
})
});
result.0
}
#[doc = " Check if a factor is unordered."]
#[doc(alias = "isUnordered")]
#[doc =
"Checked wrapper for `Rf_isUnordered`. Calls `Rf_isUnordered_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2654, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isUnordered(s: SEXP) -> Rboolean {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isUnordered_unchecked(s)
})
});
result.0
}
#[doc = " Check if a vector is unsorted."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `x`: Vector to check"]
#[doc = " - `strictly`: If TRUE, check for strictly increasing"]
#[doc(alias = "isUnsorted")]
#[doc =
"Checked wrapper for `Rf_isUnsorted`. Calls `Rf_isUnsorted_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2663, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_isUnsorted(x: SEXP, strictly: Rboolean)
-> ::std::os::raw::c_int {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_isUnsorted_unchecked(x, strictly)
})
});
result.0
}
#[doc = " Substitute in an expression."]
#[doc = ""]
#[doc = " Like R\'s `substitute()` function."]
#[doc(alias = "substitute")]
#[doc =
"Checked wrapper for `Rf_substitute`. Calls `Rf_substitute_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2671, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_substitute(lang: SEXP, rho: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_substitute_unchecked(lang, rho)
})
});
result.0
}
#[doc = " Set vector length."]
#[doc = ""]
#[doc = " For short vectors (length < 2^31)."]
#[doc(alias = "lengthgets")]
#[doc =
"Checked wrapper for `Rf_lengthgets`. Calls `Rf_lengthgets_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2677, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_lengthgets(x: SEXP, newlen: R_xlen_t) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_lengthgets_unchecked(x, newlen)
})
});
result.0
}
#[doc = " Set vector length (long vector version)."]
#[doc(alias = "xlengthgets")]
#[doc =
"Checked wrapper for `Rf_xlengthgets`. Calls `Rf_xlengthgets_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2681, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_xlengthgets(x: SEXP, newlen: R_xlen_t) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_xlengthgets_unchecked(x, newlen)
})
});
result.0
}
#[doc = " Protect a SEXP and record its stack index for later `R_Reprotect`."]
#[doc = ""]
#[doc =
" **Cost: O(1)** — same array write as `Rf_protect`, plus stores the index."]
#[doc =
" No allocation. Use when you need to replace a protected value in-place"]
#[doc =
" (e.g., inside a loop that allocates) without unprotect/re-protect churn."]
#[doc(alias = "PROTECT_WITH_INDEX")]
#[doc =
"Checked wrapper for `R_ProtectWithIndex`. Calls `R_ProtectWithIndex_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2691, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_ProtectWithIndex(s: SEXP, index: *mut ::std::os::raw::c_int) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_ProtectWithIndex_unchecked(s, index)
})
});
result.0
}
#[doc = " Replace the SEXP at a previously recorded protect stack index."]
#[doc = ""]
#[doc =
" **Cost: O(1)** — direct array write (`R_PPStack[index] = s`). No allocation."]
#[doc = ""]
#[doc = " # Safety"]
#[doc = ""]
#[doc = " `index` must be from a previous `R_ProtectWithIndex` call and the"]
#[doc = " stack must not have been unprotected past that index."]
#[doc(alias = "REPROTECT")]
#[doc =
"Checked wrapper for `R_Reprotect`. Calls `R_Reprotect_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2702, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_Reprotect(s: SEXP, index: ::std::os::raw::c_int) {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_Reprotect_unchecked(s, index)
})
});
result.0
}
#[doc = " Create a weak reference."]
#[doc = ""]
#[doc = " # Parameters"]
#[doc = ""]
#[doc = " - `key`: The key object (weak reference target)"]
#[doc = " - `val`: The value to associate"]
#[doc = " - `fin`: Finalizer function (or R_NilValue)"]
#[doc = " - `onexit`: Whether to run finalizer on R exit"]
#[doc =
"Checked wrapper for `R_MakeWeakRef`. Calls `R_MakeWeakRef_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2714, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_MakeWeakRef(key: SEXP, val: SEXP, fin: SEXP, onexit: Rboolean)
-> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_MakeWeakRef_unchecked(key, val, fin, onexit)
})
});
result.0
}
#[doc = " Create a weak reference with C finalizer."]
#[doc =
"Checked wrapper for `R_MakeWeakRefC`. Calls `R_MakeWeakRefC_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2717, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_MakeWeakRefC(key: SEXP, val: SEXP, fin: R_CFinalizer_t,
onexit: Rboolean) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_MakeWeakRefC_unchecked(key, val, fin, onexit)
})
});
result.0
}
#[doc = " Get the key from a weak reference."]
#[doc =
"Checked wrapper for `R_WeakRefKey`. Calls `R_WeakRefKey_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2720, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_WeakRefKey(w: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_WeakRefKey_unchecked(w)
})
});
result.0
}
#[doc = " Get the value from a weak reference."]
#[doc =
"Checked wrapper for `R_WeakRefValue`. Calls `R_WeakRefValue_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2723, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_WeakRefValue(w: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_WeakRefValue_unchecked(w)
})
});
result.0
}
#[doc = " Run pending finalizers."]
#[doc =
"Checked wrapper for `R_RunPendingFinalizers`. Calls `R_RunPendingFinalizers_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2726, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_RunPendingFinalizers() {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
R_RunPendingFinalizers_unchecked()
})
});
result.0
}
#[doc = " Convert a pairlist to a generic vector (list)."]
#[doc(alias = "PairToVectorList")]
#[doc =
"Checked wrapper for `Rf_PairToVectorList`. Calls `Rf_PairToVectorList_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2732, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_PairToVectorList(x: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_PairToVectorList_unchecked(x)
})
});
result.0
}
#[doc = " Convert a generic vector (list) to a pairlist."]
#[doc(alias = "VectorToPairList")]
#[doc =
"Checked wrapper for `Rf_VectorToPairList`. Calls `Rf_VectorToPairList_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2736, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_VectorToPairList(x: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_VectorToPairList_unchecked(x)
})
});
result.0
}
#[doc = " Install a symbol from a CHARSXP."]
#[doc = ""]
#[doc = " Like `Rf_install()` but takes a CHARSXP instead of C string."]
#[doc(alias = "installChar")]
#[doc =
"Checked wrapper for `Rf_installChar`. Calls `Rf_installChar_unchecked` and routes through `with_r_thread`."]
#[doc = "Generated from source location line 2744, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn Rf_installChar(x: SEXP) -> SEXP {
let result =
::miniextendr_api::worker::with_r_thread(move ||
{
::miniextendr_api::worker::Sendable(unsafe {
Rf_installChar_unchecked(x)
})
});
result.0
}#[r_ffi_checked]
2491unsafe extern "C-unwind" {
2492 #[doc(alias = "mkCharCE")]
2502 pub(crate) fn Rf_mkCharCE(s: *const ::std::os::raw::c_char, encoding: cetype_t) -> SEXP;
2503
2504 pub fn R_nchar(
2518 x: SEXP,
2519 ntype: ::std::os::raw::c_int,
2520 allowNA: Rboolean,
2521 keepNA: Rboolean,
2522 msg_name: *const ::std::os::raw::c_char,
2523 ) -> ::std::os::raw::c_int;
2524
2525 #[doc(alias = "type2char")]
2529 pub fn Rf_type2char(sexptype: SEXPTYPE) -> *const ::std::os::raw::c_char;
2530
2531 #[doc(alias = "PrintValue")]
2535 pub fn Rf_PrintValue(x: SEXP);
2536
2537 pub(crate) fn R_NewEnv(enclos: SEXP, hash: Rboolean, size: ::std::os::raw::c_int) -> SEXP;
2548
2549 pub fn R_existsVarInFrame(rho: SEXP, symbol: SEXP) -> Rboolean;
2553
2554 pub fn R_removeVarFromFrame(symbol: SEXP, env: SEXP) -> SEXP;
2560
2561 #[doc(alias = "topenv")]
2566 pub fn Rf_topenv(target: SEXP, envir: SEXP) -> SEXP;
2567
2568 #[doc(alias = "match")]
2584 pub fn Rf_match(x: SEXP, table: SEXP, nomatch: ::std::os::raw::c_int) -> SEXP;
2585
2586 #[doc(alias = "copyMostAttrib")]
2592 pub fn Rf_copyMostAttrib(source: SEXP, target: SEXP);
2593
2594 #[doc(alias = "any_duplicated")]
2605 pub fn Rf_any_duplicated(x: SEXP, fromLast: Rboolean) -> R_xlen_t;
2606
2607 #[doc(alias = "asS4")]
2616 pub fn Rf_asS4(object: SEXP, flag: Rboolean, complete: ::std::os::raw::c_int) -> SEXP;
2617
2618 #[doc(alias = "S3Class")]
2620 pub fn Rf_S3Class(object: SEXP) -> SEXP;
2621
2622 #[doc(alias = "GetOption1")]
2632 pub fn Rf_GetOption1(tag: SEXP) -> SEXP;
2633
2634 #[doc(alias = "GetOptionDigits")]
2638 pub fn Rf_GetOptionDigits() -> ::std::os::raw::c_int;
2639
2640 #[doc(alias = "GetOptionWidth")]
2644 pub(crate) fn Rf_GetOptionWidth() -> ::std::os::raw::c_int;
2645
2646 #[doc(alias = "isOrdered")]
2650 pub fn Rf_isOrdered(s: SEXP) -> Rboolean;
2651
2652 #[doc(alias = "isUnordered")]
2654 pub fn Rf_isUnordered(s: SEXP) -> Rboolean;
2655
2656 #[doc(alias = "isUnsorted")]
2663 pub fn Rf_isUnsorted(x: SEXP, strictly: Rboolean) -> ::std::os::raw::c_int;
2664
2665 #[doc(alias = "substitute")]
2671 pub fn Rf_substitute(lang: SEXP, rho: SEXP) -> SEXP;
2672
2673 #[doc(alias = "lengthgets")]
2677 pub fn Rf_lengthgets(x: SEXP, newlen: R_xlen_t) -> SEXP;
2678
2679 #[doc(alias = "xlengthgets")]
2681 pub fn Rf_xlengthgets(x: SEXP, newlen: R_xlen_t) -> SEXP;
2682
2683 #[doc(alias = "PROTECT_WITH_INDEX")]
2691 pub fn R_ProtectWithIndex(s: SEXP, index: *mut ::std::os::raw::c_int);
2692
2693 #[doc(alias = "REPROTECT")]
2702 pub fn R_Reprotect(s: SEXP, index: ::std::os::raw::c_int);
2703
2704 pub fn R_MakeWeakRef(key: SEXP, val: SEXP, fin: SEXP, onexit: Rboolean) -> SEXP;
2715
2716 pub fn R_MakeWeakRefC(key: SEXP, val: SEXP, fin: R_CFinalizer_t, onexit: Rboolean) -> SEXP;
2718
2719 pub fn R_WeakRefKey(w: SEXP) -> SEXP;
2721
2722 pub fn R_WeakRefValue(w: SEXP) -> SEXP;
2724
2725 pub fn R_RunPendingFinalizers();
2727
2728 #[doc(alias = "PairToVectorList")]
2732 pub fn Rf_PairToVectorList(x: SEXP) -> SEXP;
2733
2734 #[doc(alias = "VectorToPairList")]
2736 pub fn Rf_VectorToPairList(x: SEXP) -> SEXP;
2737
2738 #[doc(alias = "installChar")]
2744 pub fn Rf_installChar(x: SEXP) -> SEXP;
2745}
2746
2747