1pub mod altrep;
56
57use crate::sexp::SEXP;
63use crate::sexp_types::{R_CFinalizer_t, R_xlen_t, Rboolean, Rbyte, Rcomplex, SEXPTYPE, cetype_t};
64
65#[cfg(feature = "connections")]
73#[repr(C)]
74#[allow(non_camel_case_types)]
75pub struct Rconnection_impl(::std::os::raw::c_void);
76
77#[cfg(feature = "connections")]
83#[allow(non_camel_case_types)]
84pub type Rconnection = *mut Rconnection_impl;
85
86#[cfg(feature = "connections")]
98#[allow(non_upper_case_globals)]
99pub const R_CONNECTIONS_VERSION: ::std::os::raw::c_int = 1;
100
101use miniextendr_macros::r_ffi_checked;
104
105#[allow(clashing_extern_declarations)]
107#[allow(varargs_without_pattern)]
108unsafe extern "C-unwind" {
109 #[link_name = "Rf_error"]
111 pub fn Rf_error_unchecked(arg1: *const ::std::os::raw::c_char, ...) -> !;
112 #[link_name = "Rf_errorcall"]
114 pub fn Rf_errorcall_unchecked(arg1: SEXP, arg2: *const ::std::os::raw::c_char, ...) -> !;
115 #[link_name = "Rf_warning"]
117 pub fn Rf_warning_unchecked(arg1: *const ::std::os::raw::c_char, ...);
118 #[link_name = "Rprintf"]
120 pub fn Rprintf_unchecked(arg1: *const ::std::os::raw::c_char, ...);
121 #[link_name = "REprintf"]
123 pub fn REprintf_unchecked(arg1: *const ::std::os::raw::c_char, ...);
124}
125
126#[cfg(feature = "nonapi")]
128unsafe extern "C-unwind" {
129 #[expect(dead_code, reason = "declared for future use")]
130 pub(crate) static ptr_R_WriteConsoleEx: Option<
131 unsafe extern "C-unwind" fn(
132 *const ::std::os::raw::c_char,
133 ::std::os::raw::c_int,
134 ::std::os::raw::c_int,
135 ),
136 >;
137}
138
139#[inline(always)]
147#[allow(non_snake_case)]
148pub unsafe fn Rf_error(
149 fmt: *const ::std::os::raw::c_char,
150 arg1: *const ::std::os::raw::c_char,
151) -> ! {
152 if !crate::is_r_main_thread() {
153 {
::core::panicking::panic_fmt(format_args!("Rf_error called from non-main thread"));
};panic!("Rf_error called from non-main thread");
154 }
155 unsafe { Rf_error_unchecked(fmt, arg1) }
156}
157
158#[inline(always)]
166#[allow(non_snake_case)]
167pub unsafe fn Rf_errorcall(
168 call: SEXP,
169 fmt: *const ::std::os::raw::c_char,
170 arg1: *const ::std::os::raw::c_char,
171) -> ! {
172 if !crate::is_r_main_thread() {
173 {
::core::panicking::panic_fmt(format_args!("Rf_errorcall called from non-main thread"));
};panic!("Rf_errorcall called from non-main thread");
174 }
175 unsafe { Rf_errorcall_unchecked(call, fmt, arg1) }
176}
177
178#[inline(always)]
185#[allow(non_snake_case)]
186pub unsafe fn Rf_warning(fmt: *const ::std::os::raw::c_char, arg1: *const ::std::os::raw::c_char) {
187 if !crate::is_r_main_thread() {
188 {
::core::panicking::panic_fmt(format_args!("Rf_warning called from non-main thread"));
};panic!("Rf_warning called from non-main thread");
189 }
190 unsafe { Rf_warning_unchecked(fmt, arg1) }
191}
192
193#[inline(always)]
200#[allow(non_snake_case)]
201pub unsafe fn Rprintf(fmt: *const ::std::os::raw::c_char, arg1: *const ::std::os::raw::c_char) {
202 if !crate::is_r_main_thread() {
203 {
::core::panicking::panic_fmt(format_args!("Rprintf called from non-main thread"));
};panic!("Rprintf called from non-main thread");
204 }
205 unsafe { Rprintf_unchecked(fmt, arg1) }
206}
207
208#[inline(always)]
215#[allow(non_snake_case)]
216pub unsafe fn REprintf(fmt: *const ::std::os::raw::c_char, arg1: *const ::std::os::raw::c_char) {
217 if !crate::is_r_main_thread() {
218 {
::core::panicking::panic_fmt(format_args!("REprintf called from non-main thread"));
};panic!("REprintf called from non-main thread");
219 }
220 unsafe { REprintf_unchecked(fmt, arg1) }
221}
222
223#[allow(missing_docs)]
225#[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 272, 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 288, 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 290, 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 292, 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 299, 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 301, 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 303, 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 305, 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 307, 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 309, 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 312, 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 313, 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 314, 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 343, 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 344, 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 345, 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 346, 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 347, 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 348, 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 349, 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 350, 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 352, 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 353, 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 354, 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 355, 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 356, 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 357, 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 362, 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 368, 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 416, 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 426, 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 438, 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 447, 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 454, 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 459, 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 461, 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 467, 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 469, 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 479, 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 483, 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 485, 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 488, 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 489, 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 493, 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 497, 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 499, 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 501, 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 503, 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 505, 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 507, 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 514, 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 515, 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 543, 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 544, 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 545, 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 546, 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 547, 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 548, 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 549, 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 550, 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 551, 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 552, 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 553, 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 554, 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 555, 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 556, 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 557, 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 558, 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 559, 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 560, 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 561, 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 562, 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 563, 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 564, 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 567, 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 568, 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 569, 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 570, 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 571, 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 572, 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 573, 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 574, 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 575, 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 576, 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 577, 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 578, 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 579, 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 580, 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 590, 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 595, 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 606, 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 664, 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 665, 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 666, 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 667, 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 668, 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 673, 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 688, 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 694, 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 700, 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 706, 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 712, 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 719, 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 725, 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 731, 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 733, 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 736, 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 744, 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 747, 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 750, 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 754, 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 756, 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 =
" Mark an object as shared for good: R code that modifies it (`x[1] <- 0`,"]
#[doc =
" `attr(x, \"a\") <- 1`) copies it first, whatever else references it."]
#[doc = " Allocates nothing."]
#[doc = "Unchecked FFI binding for `MARK_NOT_MUTABLE`."]
#[doc = "Generated from source location line 760, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[link_name = "MARK_NOT_MUTABLE"]
pub fn MARK_NOT_MUTABLE_unchecked(x: 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 780, 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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 272, column 19."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub(crate) unsafe fn R_FlushConsole() {
::miniextendr_api::with_r_thread(move ||
unsafe { R_FlushConsole_unchecked() })
}
#[doc(alias = "mkChar")]
#[doc =
"Checked wrapper for `Rf_mkChar`. Calls `Rf_mkChar_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 288, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_mkChar_unchecked(s) })
}
#[doc(alias = "mkCharLen")]
#[doc =
"Checked wrapper for `Rf_mkCharLen`. Calls `Rf_mkCharLen_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 290, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_mkCharLen_unchecked(s, len) })
}
#[doc(alias = "mkCharLenCE")]
#[doc =
"Checked wrapper for `Rf_mkCharLenCE`. Calls `Rf_mkCharLenCE_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 292, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_mkCharLenCE_unchecked(x, len, ce) })
}
#[doc(alias = "xlength")]
#[doc(alias = "XLENGTH")]
#[doc =
"Checked wrapper for `Rf_xlength`. Calls `Rf_xlength_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 299, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_xlength_unchecked(x) })
}
#[doc(alias = "translateCharUTF8")]
#[doc =
"Checked wrapper for `Rf_translateCharUTF8`. Calls `Rf_translateCharUTF8_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 301, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_translateCharUTF8_unchecked(x) })
}
#[doc(alias = "getCharCE")]
#[doc =
"Checked wrapper for `Rf_getCharCE`. Calls `Rf_getCharCE_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 303, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_getCharCE_unchecked(x) })
}
#[doc(alias = "charIsASCII")]
#[doc =
"Checked wrapper for `Rf_charIsASCII`. Calls `Rf_charIsASCII_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 305, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_charIsASCII_unchecked(x) })
}
#[doc(alias = "charIsUTF8")]
#[doc =
"Checked wrapper for `Rf_charIsUTF8`. Calls `Rf_charIsUTF8_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 307, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_charIsUTF8_unchecked(x) })
}
#[doc(alias = "charIsLatin1")]
#[doc =
"Checked wrapper for `Rf_charIsLatin1`. Calls `Rf_charIsLatin1_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 309, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_charIsLatin1_unchecked(x) })
}
#[doc =
"Checked wrapper for `R_MakeUnwindCont`. Calls `R_MakeUnwindCont_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 312, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_MakeUnwindCont_unchecked() })
}
#[doc =
"Checked wrapper for `R_ContinueUnwind`. Calls `R_ContinueUnwind_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 313, 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::with_r_thread(move ||
unsafe { R_ContinueUnwind_unchecked(cont) })
}
#[doc =
"Checked wrapper for `R_UnwindProtect`. Calls `R_UnwindProtect_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 314, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe {
R_UnwindProtect_unchecked(fun, fun_data, cleanfun,
cleanfun_data, cont)
})
}
#[doc = " External pointer interface"]
#[doc =
"Checked wrapper for `R_MakeExternalPtr`. Calls `R_MakeExternalPtr_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 343, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_MakeExternalPtr_unchecked(p, tag, prot) })
}
#[doc =
"Checked wrapper for `R_ExternalPtrAddr`. Calls `R_ExternalPtrAddr_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 344, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_ExternalPtrAddr_unchecked(s) })
}
#[doc =
"Checked wrapper for `R_ExternalPtrTag`. Calls `R_ExternalPtrTag_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 345, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_ExternalPtrTag_unchecked(s) })
}
#[doc =
"Checked wrapper for `R_ExternalPtrProtected`. Calls `R_ExternalPtrProtected_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 346, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_ExternalPtrProtected_unchecked(s) })
}
#[doc =
"Checked wrapper for `R_ClearExternalPtr`. Calls `R_ClearExternalPtr_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 347, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_ClearExternalPtr_unchecked(s) })
}
#[doc =
"Checked wrapper for `R_SetExternalPtrAddr`. Calls `R_SetExternalPtrAddr_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 348, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_SetExternalPtrAddr_unchecked(s, p) })
}
#[doc =
"Checked wrapper for `R_SetExternalPtrTag`. Calls `R_SetExternalPtrTag_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 349, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_SetExternalPtrTag_unchecked(s, tag) })
}
#[doc =
"Checked wrapper for `R_SetExternalPtrProtected`. Calls `R_SetExternalPtrProtected_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 350, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_SetExternalPtrProtected_unchecked(s, p) })
}
#[doc = " Added in R 3.4.0"]
#[doc =
"Checked wrapper for `R_MakeExternalPtrFn`. Calls `R_MakeExternalPtrFn_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 352, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_MakeExternalPtrFn_unchecked(p, tag, prot) })
}
#[doc =
"Checked wrapper for `R_ExternalPtrAddrFn`. Calls `R_ExternalPtrAddrFn_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 353, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_ExternalPtrAddrFn_unchecked(s) })
}
#[doc =
"Checked wrapper for `R_RegisterFinalizer`. Calls `R_RegisterFinalizer_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 354, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_RegisterFinalizer_unchecked(s, fun) })
}
#[doc =
"Checked wrapper for `R_RegisterCFinalizer`. Calls `R_RegisterCFinalizer_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 355, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_RegisterCFinalizer_unchecked(s, fun) })
}
#[doc =
"Checked wrapper for `R_RegisterFinalizerEx`. Calls `R_RegisterFinalizerEx_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 356, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_RegisterFinalizerEx_unchecked(s, fun, onexit) })
}
#[doc =
"Checked wrapper for `R_RegisterCFinalizerEx`. Calls `R_RegisterCFinalizerEx_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 357, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_RegisterCFinalizerEx_unchecked(s, fun, onexit) })
}
#[doc = " Register a C-callable function for cross-package access."]
#[doc =
"Checked wrapper for `R_RegisterCCallable`. Calls `R_RegisterCCallable_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 362, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_RegisterCCallable_unchecked(package, name, fptr) })
}
#[doc = " Get a C-callable function from another package."]
#[doc =
"Checked wrapper for `R_GetCCallable`. Calls `R_GetCCallable_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 368, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_GetCCallable_unchecked(package, name) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 416, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_protect_unchecked(s) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 426, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_unprotect_unchecked(l) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 438, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_unprotect_ptr_unchecked(s) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 447, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_PreserveObject_unchecked(object) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 454, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_ReleaseObject_unchecked(object) })
}
#[doc(alias = "allocVector")]
#[doc =
"Checked wrapper for `Rf_allocVector`. Calls `Rf_allocVector_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 459, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_allocVector_unchecked(sexptype, length) })
}
#[doc(alias = "allocMatrix")]
#[doc =
"Checked wrapper for `Rf_allocMatrix`. Calls `Rf_allocMatrix_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 461, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_allocMatrix_unchecked(sexptype, nrow, ncol) })
}
#[doc(alias = "allocArray")]
#[doc =
"Checked wrapper for `Rf_allocArray`. Calls `Rf_allocArray_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 467, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_allocArray_unchecked(sexptype, dims) })
}
#[doc(alias = "alloc3DArray")]
#[doc =
"Checked wrapper for `Rf_alloc3DArray`. Calls `Rf_alloc3DArray_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 469, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_alloc3DArray_unchecked(sexptype, nrow, ncol, nface) })
}
#[doc(alias = "allocList")]
#[doc =
"Checked wrapper for `Rf_allocList`. Calls `Rf_allocList_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 479, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_allocList_unchecked(n) })
}
#[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` inside `with_r_thread`, which panics off R's main 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_allocLang(n: ::std::os::raw::c_int) -> SEXP {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_allocLang_unchecked(n) })
}
#[doc(alias = "allocS4Object")]
#[doc =
"Checked wrapper for `Rf_allocS4Object`. Calls `Rf_allocS4Object_unchecked` inside `with_r_thread`, which panics off R's main 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_allocS4Object() -> SEXP {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_allocS4Object_unchecked() })
}
#[doc =
"Checked wrapper for `Rf_cons`. Calls `Rf_cons_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 488, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_cons_unchecked(car, cdr) })
}
#[doc =
"Checked wrapper for `Rf_lcons`. Calls `Rf_lcons_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 489, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_lcons_unchecked(car, cdr) })
}
#[doc(alias = "setAttrib")]
#[doc =
"Checked wrapper for `Rf_setAttrib`. Calls `Rf_setAttrib_unchecked` inside `with_r_thread`, which panics off R's main 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_setAttrib(vec: SEXP, name: SEXP, val: SEXP) -> SEXP {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_setAttrib_unchecked(vec, name, val) })
}
#[doc(alias = "ScalarComplex")]
#[doc =
"Checked wrapper for `Rf_ScalarComplex`. Calls `Rf_ScalarComplex_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 497, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_ScalarComplex_unchecked(x) })
}
#[doc(alias = "ScalarInteger")]
#[doc =
"Checked wrapper for `Rf_ScalarInteger`. Calls `Rf_ScalarInteger_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 499, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_ScalarInteger_unchecked(x) })
}
#[doc(alias = "ScalarLogical")]
#[doc =
"Checked wrapper for `Rf_ScalarLogical`. Calls `Rf_ScalarLogical_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 501, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_ScalarLogical_unchecked(x) })
}
#[doc(alias = "ScalarRaw")]
#[doc =
"Checked wrapper for `Rf_ScalarRaw`. Calls `Rf_ScalarRaw_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 503, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_ScalarRaw_unchecked(x) })
}
#[doc(alias = "ScalarReal")]
#[doc =
"Checked wrapper for `Rf_ScalarReal`. Calls `Rf_ScalarReal_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 505, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_ScalarReal_unchecked(x) })
}
#[doc(alias = "ScalarString")]
#[doc =
"Checked wrapper for `Rf_ScalarString`. Calls `Rf_ScalarString_unchecked` inside `with_r_thread`, which panics off R's main 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_ScalarString(x: SEXP) -> SEXP {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_ScalarString_unchecked(x) })
}
#[doc =
"Checked wrapper for `DATAPTR_RO`. Calls `DATAPTR_RO_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 514, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { DATAPTR_RO_unchecked(x) })
}
#[doc =
"Checked wrapper for `DATAPTR_OR_NULL`. Calls `DATAPTR_OR_NULL_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 515, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { DATAPTR_OR_NULL_unchecked(x) })
}
#[doc =
"Checked wrapper for `CAR`. Calls `CAR_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 543, 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 {
::miniextendr_api::with_r_thread(move || unsafe { CAR_unchecked(e) })
}
#[doc =
"Checked wrapper for `CDR`. Calls `CDR_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 544, 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 {
::miniextendr_api::with_r_thread(move || unsafe { CDR_unchecked(e) })
}
#[doc =
"Checked wrapper for `CAAR`. Calls `CAAR_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 545, 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 {
::miniextendr_api::with_r_thread(move || unsafe { CAAR_unchecked(e) })
}
#[doc =
"Checked wrapper for `CDAR`. Calls `CDAR_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 546, 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 {
::miniextendr_api::with_r_thread(move || unsafe { CDAR_unchecked(e) })
}
#[doc =
"Checked wrapper for `CADR`. Calls `CADR_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 547, 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 {
::miniextendr_api::with_r_thread(move || unsafe { CADR_unchecked(e) })
}
#[doc =
"Checked wrapper for `CDDR`. Calls `CDDR_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 548, 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 {
::miniextendr_api::with_r_thread(move || unsafe { CDDR_unchecked(e) })
}
#[doc =
"Checked wrapper for `CADDR`. Calls `CADDR_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 549, 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 {
::miniextendr_api::with_r_thread(move || unsafe { CADDR_unchecked(e) })
}
#[doc =
"Checked wrapper for `CADDDR`. Calls `CADDDR_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 550, 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 {
::miniextendr_api::with_r_thread(move || unsafe { CADDDR_unchecked(e) })
}
#[doc =
"Checked wrapper for `CAD4R`. Calls `CAD4R_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 551, 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 {
::miniextendr_api::with_r_thread(move || unsafe { CAD4R_unchecked(e) })
}
#[doc =
"Checked wrapper for `TAG`. Calls `TAG_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 552, 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 {
::miniextendr_api::with_r_thread(move || unsafe { TAG_unchecked(e) })
}
#[doc =
"Checked wrapper for `SET_TAG`. Calls `SET_TAG_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 553, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { SET_TAG_unchecked(x, y) })
}
#[doc =
"Checked wrapper for `SETCAR`. Calls `SETCAR_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 554, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { SETCAR_unchecked(x, y) })
}
#[doc =
"Checked wrapper for `SETCDR`. Calls `SETCDR_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 555, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { SETCDR_unchecked(x, y) })
}
#[doc =
"Checked wrapper for `SETCADR`. Calls `SETCADR_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 556, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { SETCADR_unchecked(x, y) })
}
#[doc =
"Checked wrapper for `SETCADDR`. Calls `SETCADDR_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 557, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { SETCADDR_unchecked(x, y) })
}
#[doc =
"Checked wrapper for `SETCADDDR`. Calls `SETCADDDR_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 558, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { SETCADDDR_unchecked(x, y) })
}
#[doc =
"Checked wrapper for `SETCAD4R`. Calls `SETCAD4R_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 559, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { SETCAD4R_unchecked(e, y) })
}
#[doc =
"Checked wrapper for `LOGICAL_OR_NULL`. Calls `LOGICAL_OR_NULL_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 560, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { LOGICAL_OR_NULL_unchecked(x) })
}
#[doc =
"Checked wrapper for `INTEGER_OR_NULL`. Calls `INTEGER_OR_NULL_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 561, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { INTEGER_OR_NULL_unchecked(x) })
}
#[doc =
"Checked wrapper for `REAL_OR_NULL`. Calls `REAL_OR_NULL_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 562, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { REAL_OR_NULL_unchecked(x) })
}
#[doc =
"Checked wrapper for `COMPLEX_OR_NULL`. Calls `COMPLEX_OR_NULL_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 563, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { COMPLEX_OR_NULL_unchecked(x) })
}
#[doc =
"Checked wrapper for `RAW_OR_NULL`. Calls `RAW_OR_NULL_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 564, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { RAW_OR_NULL_unchecked(x) })
}
#[doc =
"Checked wrapper for `INTEGER_ELT`. Calls `INTEGER_ELT_unchecked` inside `with_r_thread`, which panics off R's main 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 INTEGER_ELT(x: SEXP, i: R_xlen_t) -> ::std::os::raw::c_int {
::miniextendr_api::with_r_thread(move ||
unsafe { INTEGER_ELT_unchecked(x, i) })
}
#[doc =
"Checked wrapper for `REAL_ELT`. Calls `REAL_ELT_unchecked` inside `with_r_thread`, which panics off R's main 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 REAL_ELT(x: SEXP, i: R_xlen_t) -> f64 {
::miniextendr_api::with_r_thread(move ||
unsafe { REAL_ELT_unchecked(x, i) })
}
#[doc =
"Checked wrapper for `LOGICAL_ELT`. Calls `LOGICAL_ELT_unchecked` inside `with_r_thread`, which panics off R's main 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 LOGICAL_ELT(x: SEXP, i: R_xlen_t) -> ::std::os::raw::c_int {
::miniextendr_api::with_r_thread(move ||
unsafe { LOGICAL_ELT_unchecked(x, i) })
}
#[doc =
"Checked wrapper for `COMPLEX_ELT`. Calls `COMPLEX_ELT_unchecked` inside `with_r_thread`, which panics off R's main 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 COMPLEX_ELT(x: SEXP, i: R_xlen_t) -> Rcomplex {
::miniextendr_api::with_r_thread(move ||
unsafe { COMPLEX_ELT_unchecked(x, i) })
}
#[doc =
"Checked wrapper for `RAW_ELT`. Calls `RAW_ELT_unchecked` inside `with_r_thread`, which panics off R's main 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 RAW_ELT(x: SEXP, i: R_xlen_t) -> Rbyte {
::miniextendr_api::with_r_thread(move ||
unsafe { RAW_ELT_unchecked(x, i) })
}
#[doc =
"Checked wrapper for `VECTOR_ELT`. Calls `VECTOR_ELT_unchecked` inside `with_r_thread`, which panics off R's main 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 VECTOR_ELT(x: SEXP, i: R_xlen_t) -> SEXP {
::miniextendr_api::with_r_thread(move ||
unsafe { VECTOR_ELT_unchecked(x, i) })
}
#[doc =
"Checked wrapper for `STRING_ELT`. Calls `STRING_ELT_unchecked` inside `with_r_thread`, which panics off R's main 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 STRING_ELT(x: SEXP, i: R_xlen_t) -> SEXP {
::miniextendr_api::with_r_thread(move ||
unsafe { STRING_ELT_unchecked(x, i) })
}
#[doc =
"Checked wrapper for `SET_STRING_ELT`. Calls `SET_STRING_ELT_unchecked` inside `with_r_thread`, which panics off R's main 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 SET_STRING_ELT(x: SEXP, i: R_xlen_t, v: SEXP) {
::miniextendr_api::with_r_thread(move ||
unsafe { SET_STRING_ELT_unchecked(x, i, v) })
}
#[doc =
"Checked wrapper for `SET_LOGICAL_ELT`. Calls `SET_LOGICAL_ELT_unchecked` inside `with_r_thread`, which panics off R's main 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 SET_LOGICAL_ELT(x: SEXP, i: R_xlen_t,
v: ::std::os::raw::c_int) {
::miniextendr_api::with_r_thread(move ||
unsafe { SET_LOGICAL_ELT_unchecked(x, i, v) })
}
#[doc =
"Checked wrapper for `SET_INTEGER_ELT`. Calls `SET_INTEGER_ELT_unchecked` inside `with_r_thread`, which panics off R's main 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 SET_INTEGER_ELT(x: SEXP, i: R_xlen_t,
v: ::std::os::raw::c_int) {
::miniextendr_api::with_r_thread(move ||
unsafe { SET_INTEGER_ELT_unchecked(x, i, v) })
}
#[doc =
"Checked wrapper for `SET_REAL_ELT`. Calls `SET_REAL_ELT_unchecked` inside `with_r_thread`, which panics off R's main 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_REAL_ELT(x: SEXP, i: R_xlen_t, v: f64) {
::miniextendr_api::with_r_thread(move ||
unsafe { SET_REAL_ELT_unchecked(x, i, v) })
}
#[doc =
"Checked wrapper for `SET_COMPLEX_ELT`. Calls `SET_COMPLEX_ELT_unchecked` inside `with_r_thread`, which panics off R's main 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 SET_COMPLEX_ELT(x: SEXP, i: R_xlen_t, v: Rcomplex) {
::miniextendr_api::with_r_thread(move ||
unsafe { SET_COMPLEX_ELT_unchecked(x, i, v) })
}
#[doc =
"Checked wrapper for `SET_RAW_ELT`. Calls `SET_RAW_ELT_unchecked` inside `with_r_thread`, which panics off R's main 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 SET_RAW_ELT(x: SEXP, i: R_xlen_t, v: Rbyte) {
::miniextendr_api::with_r_thread(move ||
unsafe { SET_RAW_ELT_unchecked(x, i, v) })
}
#[doc =
"Checked wrapper for `SET_VECTOR_ELT`. Calls `SET_VECTOR_ELT_unchecked` inside `with_r_thread`, which panics off R's main 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 SET_VECTOR_ELT(x: SEXP, i: R_xlen_t, v: SEXP) -> SEXP {
::miniextendr_api::with_r_thread(move ||
unsafe { SET_VECTOR_ELT_unchecked(x, i, v) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 590, 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 {
::miniextendr_api::with_r_thread(move || unsafe { LENGTH_unchecked(x) })
}
#[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` inside `with_r_thread`, which panics off R's main 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 XLENGTH(x: SEXP) -> R_xlen_t {
::miniextendr_api::with_r_thread(move || unsafe { XLENGTH_unchecked(x) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 606, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { ANY_ATTRIB_unchecked(x) })
}
#[doc =
"Checked wrapper for `ALTREP_CLASS`. Calls `ALTREP_CLASS_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 664, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { ALTREP_CLASS_unchecked(x) })
}
#[doc =
"Checked wrapper for `R_altrep_data1`. Calls `R_altrep_data1_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 665, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_altrep_data1_unchecked(x) })
}
#[doc =
"Checked wrapper for `R_altrep_data2`. Calls `R_altrep_data2_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 666, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_altrep_data2_unchecked(x) })
}
#[doc =
"Checked wrapper for `R_set_altrep_data1`. Calls `R_set_altrep_data1_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 667, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_set_altrep_data1_unchecked(x, v) })
}
#[doc =
"Checked wrapper for `R_set_altrep_data2`. Calls `R_set_altrep_data2_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 668, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_set_altrep_data2_unchecked(x, v) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 673, 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 {
::miniextendr_api::with_r_thread(move || unsafe { ALTREP_unchecked(x) })
}
#[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` inside `with_r_thread`, which panics off R's main 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 LOGICAL(x: SEXP) -> *mut ::std::os::raw::c_int {
::miniextendr_api::with_r_thread(move || unsafe { LOGICAL_unchecked(x) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 694, 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 {
::miniextendr_api::with_r_thread(move || unsafe { INTEGER_unchecked(x) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 700, 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 {
::miniextendr_api::with_r_thread(move || unsafe { REAL_unchecked(x) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 706, 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 {
::miniextendr_api::with_r_thread(move || unsafe { COMPLEX_unchecked(x) })
}
#[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` inside `with_r_thread`, which panics off R's main 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 RAW(x: SEXP) -> *mut Rbyte {
::miniextendr_api::with_r_thread(move || unsafe { RAW_unchecked(x) })
}
#[doc =
"Checked wrapper for `R_CheckUserInterrupt`. Calls `R_CheckUserInterrupt_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 719, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_CheckUserInterrupt() {
::miniextendr_api::with_r_thread(move ||
unsafe { R_CheckUserInterrupt_unchecked() })
}
#[doc =
"Checked wrapper for `TYPEOF`. Calls `TYPEOF_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 725, 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 {
::miniextendr_api::with_r_thread(move || unsafe { TYPEOF_unchecked(x) })
}
#[doc(alias = "install")]
#[doc =
"Checked wrapper for `Rf_install`. Calls `Rf_install_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 731, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_install_unchecked(name) })
}
#[doc = " Get the print name (CHARSXP) of a symbol (SYMSXP)"]
#[doc =
"Checked wrapper for `PRINTNAME`. Calls `PRINTNAME_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 733, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { PRINTNAME_unchecked(x) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 736, 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 {
::miniextendr_api::with_r_thread(move || unsafe { R_CHAR_unchecked(x) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 744, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_getAttrib_unchecked(vec, name) })
}
#[doc = " Set the `names` attribute; returns the updated object."]
#[doc(alias = "namesgets")]
#[doc =
"Checked wrapper for `Rf_namesgets`. Calls `Rf_namesgets_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 747, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_namesgets_unchecked(vec, val) })
}
#[doc = " Set the `dim` attribute; returns the updated object."]
#[doc(alias = "dimgets")]
#[doc =
"Checked wrapper for `Rf_dimgets`. Calls `Rf_dimgets_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 750, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_dimgets_unchecked(vec, val) })
}
#[doc(alias = "duplicate")]
#[doc =
"Checked wrapper for `Rf_duplicate`. Calls `Rf_duplicate_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 754, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_duplicate_unchecked(s) })
}
#[doc(alias = "shallow_duplicate")]
#[doc =
"Checked wrapper for `Rf_shallow_duplicate`. Calls `Rf_shallow_duplicate_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 756, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_shallow_duplicate_unchecked(s) })
}
#[doc =
" Mark an object as shared for good: R code that modifies it (`x[1] <- 0`,"]
#[doc =
" `attr(x, \"a\") <- 1`) copies it first, whatever else references it."]
#[doc = " Allocates nothing."]
#[doc =
"Checked wrapper for `MARK_NOT_MUTABLE`. Calls `MARK_NOT_MUTABLE_unchecked` inside `with_r_thread`, which panics off R's main 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 MARK_NOT_MUTABLE(x: SEXP) {
::miniextendr_api::with_r_thread(move ||
unsafe { MARK_NOT_MUTABLE_unchecked(x) })
}
#[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` inside `with_r_thread`, which panics off R's main 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 R_compute_identical(x: SEXP, y: SEXP,
flags: ::std::os::raw::c_int) -> Rboolean {
::miniextendr_api::with_r_thread(move ||
unsafe { R_compute_identical_unchecked(x, y, flags) })
}#[r_ffi_checked]
226#[allow(clashing_extern_declarations)]
227unsafe extern "C-unwind" {
228 pub static R_NilValue: SEXP;
230
231 #[doc(alias = "NA_STRING")]
232 pub static R_NaString: SEXP;
234 pub static R_BlankString: SEXP;
236 pub static R_NamesSymbol: SEXP;
239 pub static R_DimSymbol: SEXP;
240 pub static R_DimNamesSymbol: SEXP;
241 pub static R_ClassSymbol: SEXP;
242 pub static R_RowNamesSymbol: SEXP;
243 pub static R_LevelsSymbol: SEXP;
244 pub static R_TspSymbol: SEXP;
245
246 pub static R_GlobalEnv: SEXP;
248 pub static R_BaseEnv: SEXP;
250 pub static R_EmptyEnv: SEXP;
252 pub static R_BaseNamespace: SEXP;
254
255 pub static R_MissingArg: SEXP;
265
266 pub static R_UnboundValue: SEXP;
269
270 pub(crate) fn R_FlushConsole();
273
274 #[cfg(feature = "nonapi")]
277 pub static R_TrueValue: SEXP;
279 #[cfg(feature = "nonapi")]
280 pub static R_FalseValue: SEXP;
282 #[cfg(feature = "nonapi")]
283 pub static R_LogicalNAValue: SEXP;
285
286 #[doc(alias = "mkChar")]
288 pub fn Rf_mkChar(s: *const ::std::os::raw::c_char) -> SEXP;
289 #[doc(alias = "mkCharLen")]
290 pub fn Rf_mkCharLen(s: *const ::std::os::raw::c_char, len: i32) -> SEXP;
291 #[doc(alias = "mkCharLenCE")]
292 pub fn Rf_mkCharLenCE(
293 x: *const ::std::os::raw::c_char,
294 len: ::std::os::raw::c_int,
295 ce: cetype_t,
296 ) -> SEXP;
297 #[doc(alias = "xlength")]
298 #[doc(alias = "XLENGTH")]
299 pub fn Rf_xlength(x: SEXP) -> R_xlen_t;
300 #[doc(alias = "translateCharUTF8")]
301 pub fn Rf_translateCharUTF8(x: SEXP) -> *const ::std::os::raw::c_char;
302 #[doc(alias = "getCharCE")]
303 pub fn Rf_getCharCE(x: SEXP) -> cetype_t;
304 #[doc(alias = "charIsASCII")]
305 pub fn Rf_charIsASCII(x: SEXP) -> Rboolean;
306 #[doc(alias = "charIsUTF8")]
307 pub fn Rf_charIsUTF8(x: SEXP) -> Rboolean;
308 #[doc(alias = "charIsLatin1")]
309 pub fn Rf_charIsLatin1(x: SEXP) -> Rboolean;
310
311 pub(crate) fn R_MakeUnwindCont() -> SEXP;
313 pub(crate) fn R_ContinueUnwind(cont: SEXP) -> !;
314 pub(crate) fn R_UnwindProtect(
315 fun: ::std::option::Option<
316 unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void) -> SEXP,
317 >,
318 fun_data: *mut ::std::os::raw::c_void,
319 cleanfun: ::std::option::Option<
320 unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void, Rboolean),
321 >,
322 cleanfun_data: *mut ::std::os::raw::c_void,
323 cont: SEXP,
324 ) -> SEXP;
325
326 #[link_name = "R_UnwindProtect"]
328 pub(crate) fn R_UnwindProtect_C_unwind(
329 fun: ::std::option::Option<
330 unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void) -> SEXP,
331 >,
332 fun_data: *mut ::std::os::raw::c_void,
333 cleanfun: ::std::option::Option<
334 unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void, Rboolean),
335 >,
336 cleanfun_data: *mut ::std::os::raw::c_void,
337 cont: SEXP,
338 ) -> SEXP;
339
340 #[doc = " External pointer interface"]
343 pub(crate) fn R_MakeExternalPtr(p: *mut ::std::os::raw::c_void, tag: SEXP, prot: SEXP) -> SEXP;
344 pub fn R_ExternalPtrAddr(s: SEXP) -> *mut ::std::os::raw::c_void;
345 pub(crate) fn R_ExternalPtrTag(s: SEXP) -> SEXP;
346 pub(crate) fn R_ExternalPtrProtected(s: SEXP) -> SEXP;
347 pub(crate) fn R_ClearExternalPtr(s: SEXP);
348 pub(crate) fn R_SetExternalPtrAddr(s: SEXP, p: *mut ::std::os::raw::c_void);
349 pub(crate) fn R_SetExternalPtrTag(s: SEXP, tag: SEXP);
350 pub(crate) fn R_SetExternalPtrProtected(s: SEXP, p: SEXP);
351 #[doc = " Added in R 3.4.0"]
352 pub fn R_MakeExternalPtrFn(p: DL_FUNC, tag: SEXP, prot: SEXP) -> SEXP;
353 pub fn R_ExternalPtrAddrFn(s: SEXP) -> DL_FUNC;
354 pub fn R_RegisterFinalizer(s: SEXP, fun: SEXP);
355 pub(crate) fn R_RegisterCFinalizer(s: SEXP, fun: R_CFinalizer_t);
356 pub fn R_RegisterFinalizerEx(s: SEXP, fun: SEXP, onexit: Rboolean);
357 pub(crate) fn R_RegisterCFinalizerEx(s: SEXP, fun: R_CFinalizer_t, onexit: Rboolean);
358
359 pub(crate) fn R_RegisterCCallable(
363 package: *const ::std::os::raw::c_char,
364 name: *const ::std::os::raw::c_char,
365 fptr: DL_FUNC,
366 );
367 pub(crate) fn R_GetCCallable(
369 package: *const ::std::os::raw::c_char,
370 name: *const ::std::os::raw::c_char,
371 ) -> DL_FUNC;
372
373 #[doc(alias = "PROTECT")]
415 #[doc(alias = "protect")]
416 pub fn Rf_protect(s: SEXP) -> SEXP;
417
418 #[doc(alias = "UNPROTECT")]
425 #[doc(alias = "unprotect")]
426 pub fn Rf_unprotect(l: ::std::os::raw::c_int);
427
428 #[doc(alias = "UNPROTECT_PTR")]
438 pub fn Rf_unprotect_ptr(s: SEXP);
439
440 pub fn R_PreserveObject(object: SEXP);
448
449 pub fn R_ReleaseObject(object: SEXP);
455
456 #[doc(alias = "allocVector")]
459 pub fn Rf_allocVector(sexptype: SEXPTYPE, length: R_xlen_t) -> SEXP;
460 #[doc(alias = "allocMatrix")]
461 pub fn Rf_allocMatrix(
462 sexptype: SEXPTYPE,
463 nrow: ::std::os::raw::c_int,
464 ncol: ::std::os::raw::c_int,
465 ) -> SEXP;
466 #[doc(alias = "allocArray")]
467 pub fn Rf_allocArray(sexptype: SEXPTYPE, dims: SEXP) -> SEXP;
468 #[doc(alias = "alloc3DArray")]
469 pub fn Rf_alloc3DArray(
470 sexptype: SEXPTYPE,
471 nrow: ::std::os::raw::c_int,
472 ncol: ::std::os::raw::c_int,
473 nface: ::std::os::raw::c_int,
474 ) -> SEXP;
475
476 #[doc(alias = "allocList")]
479 pub(crate) fn Rf_allocList(n: ::std::os::raw::c_int) -> SEXP;
480 #[doc(alias = "allocLang")]
483 pub fn Rf_allocLang(n: ::std::os::raw::c_int) -> SEXP;
484 #[doc(alias = "allocS4Object")]
485 pub fn Rf_allocS4Object() -> SEXP;
486
487 pub fn Rf_cons(car: SEXP, cdr: SEXP) -> SEXP;
489 pub fn Rf_lcons(car: SEXP, cdr: SEXP) -> SEXP;
490
491 #[doc(alias = "setAttrib")]
493 pub fn Rf_setAttrib(vec: SEXP, name: SEXP, val: SEXP) -> SEXP;
494
495 #[doc(alias = "ScalarComplex")]
497 pub fn Rf_ScalarComplex(x: Rcomplex) -> SEXP;
498 #[doc(alias = "ScalarInteger")]
499 pub fn Rf_ScalarInteger(x: ::std::os::raw::c_int) -> SEXP;
500 #[doc(alias = "ScalarLogical")]
501 pub fn Rf_ScalarLogical(x: ::std::os::raw::c_int) -> SEXP;
502 #[doc(alias = "ScalarRaw")]
503 pub fn Rf_ScalarRaw(x: Rbyte) -> SEXP;
504 #[doc(alias = "ScalarReal")]
505 pub fn Rf_ScalarReal(x: f64) -> SEXP;
506 #[doc(alias = "ScalarString")]
507 pub fn Rf_ScalarString(x: SEXP) -> SEXP;
508
509 #[cfg(feature = "nonapi")]
513 pub(crate) fn DATAPTR(x: SEXP) -> *mut ::std::os::raw::c_void;
514 pub fn DATAPTR_RO(x: SEXP) -> *const ::std::os::raw::c_void;
515 pub fn DATAPTR_OR_NULL(x: SEXP) -> *const ::std::os::raw::c_void;
516
517 pub fn CAR(e: SEXP) -> SEXP;
544 pub fn CDR(e: SEXP) -> SEXP;
545 pub fn CAAR(e: SEXP) -> SEXP;
546 pub fn CDAR(e: SEXP) -> SEXP;
547 pub fn CADR(e: SEXP) -> SEXP;
548 pub fn CDDR(e: SEXP) -> SEXP;
549 pub fn CADDR(e: SEXP) -> SEXP;
550 pub fn CADDDR(e: SEXP) -> SEXP;
551 pub fn CAD4R(e: SEXP) -> SEXP;
552 pub fn TAG(e: SEXP) -> SEXP;
553 pub fn SET_TAG(x: SEXP, y: SEXP);
554 pub fn SETCAR(x: SEXP, y: SEXP) -> SEXP;
555 pub fn SETCDR(x: SEXP, y: SEXP) -> SEXP;
556 pub fn SETCADR(x: SEXP, y: SEXP) -> SEXP;
557 pub fn SETCADDR(x: SEXP, y: SEXP) -> SEXP;
558 pub fn SETCADDDR(x: SEXP, y: SEXP) -> SEXP;
559 pub fn SETCAD4R(e: SEXP, y: SEXP) -> SEXP;
560 pub fn LOGICAL_OR_NULL(x: SEXP) -> *const ::std::os::raw::c_int;
561 pub fn INTEGER_OR_NULL(x: SEXP) -> *const ::std::os::raw::c_int;
562 pub fn REAL_OR_NULL(x: SEXP) -> *const f64;
563 pub fn COMPLEX_OR_NULL(x: SEXP) -> *const Rcomplex;
564 pub fn RAW_OR_NULL(x: SEXP) -> *const Rbyte;
565
566 pub fn INTEGER_ELT(x: SEXP, i: R_xlen_t) -> ::std::os::raw::c_int;
568 pub fn REAL_ELT(x: SEXP, i: R_xlen_t) -> f64;
569 pub fn LOGICAL_ELT(x: SEXP, i: R_xlen_t) -> ::std::os::raw::c_int;
570 pub fn COMPLEX_ELT(x: SEXP, i: R_xlen_t) -> Rcomplex;
571 pub fn RAW_ELT(x: SEXP, i: R_xlen_t) -> Rbyte;
572 pub fn VECTOR_ELT(x: SEXP, i: R_xlen_t) -> SEXP;
573 pub fn STRING_ELT(x: SEXP, i: R_xlen_t) -> SEXP;
574 pub fn SET_STRING_ELT(x: SEXP, i: R_xlen_t, v: SEXP);
575 pub fn SET_LOGICAL_ELT(x: SEXP, i: R_xlen_t, v: ::std::os::raw::c_int);
576 pub fn SET_INTEGER_ELT(x: SEXP, i: R_xlen_t, v: ::std::os::raw::c_int);
577 pub fn SET_REAL_ELT(x: SEXP, i: R_xlen_t, v: f64);
578 pub fn SET_COMPLEX_ELT(x: SEXP, i: R_xlen_t, v: Rcomplex);
579 pub fn SET_RAW_ELT(x: SEXP, i: R_xlen_t, v: Rbyte);
580 pub fn SET_VECTOR_ELT(x: SEXP, i: R_xlen_t, v: SEXP) -> SEXP;
581
582 pub fn LENGTH(x: SEXP) -> ::std::os::raw::c_int;
591
592 pub fn XLENGTH(x: SEXP) -> R_xlen_t;
596
597 #[cfg(r_4_5)]
605 #[doc(alias = "NO_ATTRIB")]
606 pub fn ANY_ATTRIB(x: SEXP) -> ::std::os::raw::c_int;
607
608 #[cfg(feature = "nonapi")]
620 pub fn ATTRIB(x: SEXP) -> SEXP;
621
622 #[cfg(feature = "nonapi")]
632 pub fn SET_ATTRIB(x: SEXP, v: SEXP);
633
634 #[cfg(feature = "nonapi")]
639 pub fn OBJECT(x: SEXP) -> ::std::os::raw::c_int;
640
641 #[cfg(feature = "nonapi")]
644 pub fn SET_OBJECT(x: SEXP, v: ::std::os::raw::c_int);
645
646 #[cfg(feature = "nonapi")]
651 pub fn LEVELS(x: SEXP) -> ::std::os::raw::c_int;
652
653 #[cfg(feature = "nonapi")]
657 pub fn SETLEVELS(x: SEXP, v: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
658
659 pub(crate) fn ALTREP_CLASS(x: SEXP) -> SEXP;
665 pub fn R_altrep_data1(x: SEXP) -> SEXP;
666 pub fn R_altrep_data2(x: SEXP) -> SEXP;
667 pub fn R_set_altrep_data1(x: SEXP, v: SEXP);
668 pub fn R_set_altrep_data2(x: SEXP, v: SEXP);
669
670 pub fn ALTREP(x: SEXP) -> ::std::os::raw::c_int;
674
675 pub(crate) fn LOGICAL(x: SEXP) -> *mut ::std::os::raw::c_int;
689
690 pub(crate) fn INTEGER(x: SEXP) -> *mut ::std::os::raw::c_int;
695
696 pub(crate) fn REAL(x: SEXP) -> *mut f64;
701
702 pub(crate) fn COMPLEX(x: SEXP) -> *mut Rcomplex;
707
708 pub(crate) fn RAW(x: SEXP) -> *mut Rbyte;
713
714 pub fn R_CheckUserInterrupt();
720
721 pub fn TYPEOF(x: SEXP) -> SEXPTYPE;
726
727 #[doc(alias = "install")]
731 pub fn Rf_install(name: *const ::std::os::raw::c_char) -> SEXP;
732 pub fn PRINTNAME(x: SEXP) -> SEXP;
734 #[doc(alias = "CHAR")]
736 pub fn R_CHAR(x: SEXP) -> *const ::std::os::raw::c_char;
737
738 #[doc(alias = "getAttrib")]
744 pub fn Rf_getAttrib(vec: SEXP, name: SEXP) -> SEXP;
745 #[doc(alias = "namesgets")]
747 pub fn Rf_namesgets(vec: SEXP, val: SEXP) -> SEXP;
748 #[doc(alias = "dimgets")]
750 pub fn Rf_dimgets(vec: SEXP, val: SEXP) -> SEXP;
751
752 #[doc(alias = "duplicate")]
754 pub fn Rf_duplicate(s: SEXP) -> SEXP;
755 #[doc(alias = "shallow_duplicate")]
756 pub fn Rf_shallow_duplicate(s: SEXP) -> SEXP;
757 pub fn MARK_NOT_MUTABLE(x: SEXP);
761
762 pub fn R_compute_identical(x: SEXP, y: SEXP, flags: ::std::os::raw::c_int) -> Rboolean;
781}
782
783pub const IDENT_NUM_AS_BITS: ::std::os::raw::c_int = 1;
785pub const IDENT_NA_AS_BITS: ::std::os::raw::c_int = 2;
787pub const IDENT_ATTR_BY_ORDER: ::std::os::raw::c_int = 4;
789pub const IDENT_USE_BYTECODE: ::std::os::raw::c_int = 8;
791pub const IDENT_USE_CLOENV: ::std::os::raw::c_int = 16;
793pub const IDENT_USE_SRCREF: ::std::os::raw::c_int = 32;
795pub const IDENT_EXTPTR_AS_REF: ::std::os::raw::c_int = 64;
797
798#[allow(missing_docs)]
800#[allow(missing_docs)]
unsafe extern "C-unwind" {
#[doc(alias = "asLogical")]
#[doc = "Unchecked FFI binding for `Rf_asLogical`."]
#[doc = "Generated from source location line 804, 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 806, 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 808, 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 810, 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 812, 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 816, 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 818, 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 822, 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 826, 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 828, 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 830, 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 832, 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 834, 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 836, 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 838, 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 840, 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 844, 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 846, 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 848, 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 850, 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 852, 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 854, 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 856, 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 858, 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 860, 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 862, 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 864, 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 866, 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 870, 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 872, 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 874, 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 876, 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 892, 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 903, 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 906, 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 908, 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 920, 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 922, 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 924, 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 926, 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 931, 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 937, 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 941, 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 943, 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 951, 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 961, 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 971, 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 981, 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 992, 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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 804, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_asLogical_unchecked(x) })
}
#[doc(alias = "asInteger")]
#[doc =
"Checked wrapper for `Rf_asInteger`. Calls `Rf_asInteger_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 806, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_asInteger_unchecked(x) })
}
#[doc(alias = "asReal")]
#[doc =
"Checked wrapper for `Rf_asReal`. Calls `Rf_asReal_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 808, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_asReal_unchecked(x) })
}
#[doc(alias = "asChar")]
#[doc =
"Checked wrapper for `Rf_asChar`. Calls `Rf_asChar_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 810, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_asChar_unchecked(x) })
}
#[doc(alias = "coerceVector")]
#[doc =
"Checked wrapper for `Rf_coerceVector`. Calls `Rf_coerceVector_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 812, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_coerceVector_unchecked(v, sexptype) })
}
#[doc(alias = "nrows")]
#[doc =
"Checked wrapper for `Rf_nrows`. Calls `Rf_nrows_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 816, 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 {
::miniextendr_api::with_r_thread(move || unsafe { Rf_nrows_unchecked(x) })
}
#[doc(alias = "ncols")]
#[doc =
"Checked wrapper for `Rf_ncols`. Calls `Rf_ncols_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 818, 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 {
::miniextendr_api::with_r_thread(move || unsafe { Rf_ncols_unchecked(x) })
}
#[doc(alias = "inherits")]
#[doc =
"Checked wrapper for `Rf_inherits`. Calls `Rf_inherits_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 822, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_inherits_unchecked(x, klass) })
}
#[doc(alias = "isNull")]
#[doc =
"Checked wrapper for `Rf_isNull`. Calls `Rf_isNull_unchecked` inside `with_r_thread`, which panics off R's main 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_isNull(s: SEXP) -> Rboolean {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isNull_unchecked(s) })
}
#[doc(alias = "isSymbol")]
#[doc =
"Checked wrapper for `Rf_isSymbol`. Calls `Rf_isSymbol_unchecked` inside `with_r_thread`, which panics off R's main 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_isSymbol(s: SEXP) -> Rboolean {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isSymbol_unchecked(s) })
}
#[doc(alias = "isLogical")]
#[doc =
"Checked wrapper for `Rf_isLogical`. Calls `Rf_isLogical_unchecked` inside `with_r_thread`, which panics off R's main 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_isLogical(s: SEXP) -> Rboolean {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isLogical_unchecked(s) })
}
#[doc(alias = "isReal")]
#[doc =
"Checked wrapper for `Rf_isReal`. Calls `Rf_isReal_unchecked` inside `with_r_thread`, which panics off R's main 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_isReal(s: SEXP) -> Rboolean {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isReal_unchecked(s) })
}
#[doc(alias = "isComplex")]
#[doc =
"Checked wrapper for `Rf_isComplex`. Calls `Rf_isComplex_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 834, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isComplex_unchecked(s) })
}
#[doc(alias = "isExpression")]
#[doc =
"Checked wrapper for `Rf_isExpression`. Calls `Rf_isExpression_unchecked` inside `with_r_thread`, which panics off R's main 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_isExpression(s: SEXP) -> Rboolean {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isExpression_unchecked(s) })
}
#[doc(alias = "isEnvironment")]
#[doc =
"Checked wrapper for `Rf_isEnvironment`. Calls `Rf_isEnvironment_unchecked` inside `with_r_thread`, which panics off R's main 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_isEnvironment(s: SEXP) -> Rboolean {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isEnvironment_unchecked(s) })
}
#[doc(alias = "isString")]
#[doc =
"Checked wrapper for `Rf_isString`. Calls `Rf_isString_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 840, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isString_unchecked(s) })
}
#[doc(alias = "isArray")]
#[doc =
"Checked wrapper for `Rf_isArray`. Calls `Rf_isArray_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 844, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isArray_unchecked(s) })
}
#[doc(alias = "isMatrix")]
#[doc =
"Checked wrapper for `Rf_isMatrix`. Calls `Rf_isMatrix_unchecked` inside `with_r_thread`, which panics off R's main 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_isMatrix(s: SEXP) -> Rboolean {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isMatrix_unchecked(s) })
}
#[doc(alias = "isList")]
#[doc =
"Checked wrapper for `Rf_isList`. Calls `Rf_isList_unchecked` inside `with_r_thread`, which panics off R's main 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_isList(s: SEXP) -> Rboolean {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isList_unchecked(s) })
}
#[doc(alias = "isNewList")]
#[doc =
"Checked wrapper for `Rf_isNewList`. Calls `Rf_isNewList_unchecked` inside `with_r_thread`, which panics off R's main 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_isNewList(s: SEXP) -> Rboolean {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isNewList_unchecked(s) })
}
#[doc(alias = "isPairList")]
#[doc =
"Checked wrapper for `Rf_isPairList`. Calls `Rf_isPairList_unchecked` inside `with_r_thread`, which panics off R's main 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_isPairList(s: SEXP) -> Rboolean {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isPairList_unchecked(s) })
}
#[doc(alias = "isFunction")]
#[doc =
"Checked wrapper for `Rf_isFunction`. Calls `Rf_isFunction_unchecked` inside `with_r_thread`, which panics off R's main 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_isFunction(s: SEXP) -> Rboolean {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isFunction_unchecked(s) })
}
#[doc(alias = "isPrimitive")]
#[doc =
"Checked wrapper for `Rf_isPrimitive`. Calls `Rf_isPrimitive_unchecked` inside `with_r_thread`, which panics off R's main 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_isPrimitive(s: SEXP) -> Rboolean {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isPrimitive_unchecked(s) })
}
#[doc(alias = "isLanguage")]
#[doc =
"Checked wrapper for `Rf_isLanguage`. Calls `Rf_isLanguage_unchecked` inside `with_r_thread`, which panics off R's main 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_isLanguage(s: SEXP) -> Rboolean {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isLanguage_unchecked(s) })
}
#[doc(alias = "isDataFrame")]
#[doc =
"Checked wrapper for `Rf_isDataFrame`. Calls `Rf_isDataFrame_unchecked` inside `with_r_thread`, which panics off R's main 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_isDataFrame(s: SEXP) -> Rboolean {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isDataFrame_unchecked(s) })
}
#[doc(alias = "isFactor")]
#[doc =
"Checked wrapper for `Rf_isFactor`. Calls `Rf_isFactor_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 862, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isFactor_unchecked(s) })
}
#[doc(alias = "isInteger")]
#[doc =
"Checked wrapper for `Rf_isInteger`. Calls `Rf_isInteger_unchecked` inside `with_r_thread`, which panics off R's main 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_isInteger(s: SEXP) -> Rboolean {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isInteger_unchecked(s) })
}
#[doc(alias = "isObject")]
#[doc =
"Checked wrapper for `Rf_isObject`. Calls `Rf_isObject_unchecked` inside `with_r_thread`, which panics off R's main 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_isObject(s: SEXP) -> Rboolean {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isObject_unchecked(s) })
}
#[doc(alias = "elt")]
#[doc =
"Checked wrapper for `Rf_elt`. Calls `Rf_elt_unchecked` inside `with_r_thread`, which panics off R's main 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_elt(list: SEXP, i: ::std::os::raw::c_int) -> SEXP {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_elt_unchecked(list, i) })
}
#[doc(alias = "lastElt")]
#[doc =
"Checked wrapper for `Rf_lastElt`. Calls `Rf_lastElt_unchecked` inside `with_r_thread`, which panics off R's main 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_lastElt(list: SEXP) -> SEXP {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_lastElt_unchecked(list) })
}
#[doc(alias = "nthcdr")]
#[doc =
"Checked wrapper for `Rf_nthcdr`. Calls `Rf_nthcdr_unchecked` inside `with_r_thread`, which panics off R's main 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_nthcdr(list: SEXP, n: ::std::os::raw::c_int) -> SEXP {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_nthcdr_unchecked(list, n) })
}
#[doc(alias = "listAppend")]
#[doc =
"Checked wrapper for `Rf_listAppend`. Calls `Rf_listAppend_unchecked` inside `with_r_thread`, which panics off R's main 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_listAppend(s: SEXP, t: SEXP) -> SEXP {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_listAppend_unchecked(s, t) })
}
#[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` inside `with_r_thread`, which panics off R's main 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_classgets(vec: SEXP, klass: SEXP) -> SEXP {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_classgets_unchecked(vec, klass) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 903, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_dimnamesgets_unchecked(vec, val) })
}
#[doc(alias = "GetRowNames")]
#[doc =
"Checked wrapper for `Rf_GetRowNames`. Calls `Rf_GetRowNames_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 906, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_GetRowNames_unchecked(dimnames) })
}
#[doc(alias = "GetColNames")]
#[doc =
"Checked wrapper for `Rf_GetColNames`. Calls `Rf_GetColNames_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 908, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_GetColNames_unchecked(dimnames) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 920, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_getVarEx_unchecked(sym, rho, inherits, ifnotfound) })
}
#[doc(alias = "defineVar")]
#[doc =
"Checked wrapper for `Rf_defineVar`. Calls `Rf_defineVar_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 922, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_defineVar_unchecked(symbol, value, rho) })
}
#[doc(alias = "setVar")]
#[doc =
"Checked wrapper for `Rf_setVar`. Calls `Rf_setVar_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 924, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_setVar_unchecked(symbol, value, rho) })
}
#[doc(alias = "findFun")]
#[doc =
"Checked wrapper for `Rf_findFun`. Calls `Rf_findFun_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 926, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_findFun_unchecked(symbol, rho) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 931, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_FindNamespace_unchecked(info) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 937, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_GetCurrentEnv_unchecked() })
}
#[doc(alias = "eval")]
#[doc =
"Checked wrapper for `Rf_eval`. Calls `Rf_eval_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 941, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_eval_unchecked(expr, rho) })
}
#[doc(alias = "applyClosure")]
#[doc =
"Checked wrapper for `Rf_applyClosure`. Calls `Rf_applyClosure_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 943, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe {
Rf_applyClosure_unchecked(call, op, args, rho, suppliedvars,
check)
})
}
#[doc =
"Checked wrapper for `R_tryEval`. Calls `R_tryEval_unchecked` inside `with_r_thread`, which panics off R's main 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_tryEval(expr: SEXP, env: SEXP,
error_occurred: *mut ::std::os::raw::c_int) -> SEXP {
::miniextendr_api::with_r_thread(move ||
unsafe { R_tryEval_unchecked(expr, env, error_occurred) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 961, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_ToplevelExec_unchecked(fun, data) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 971, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_tryCatchError_unchecked(body, bdata, handler, hdata) })
}
#[doc =
"Checked wrapper for `R_forceAndCall`. Calls `R_forceAndCall_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 981, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_forceAndCall_unchecked(e, n, rho) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 992, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_ParseVector_unchecked(text, n, status, srcfile) })
}#[r_ffi_checked]
801unsafe extern "C-unwind" {
802 #[doc(alias = "asLogical")]
804 pub fn Rf_asLogical(x: SEXP) -> ::std::os::raw::c_int;
805 #[doc(alias = "asInteger")]
806 pub fn Rf_asInteger(x: SEXP) -> ::std::os::raw::c_int;
807 #[doc(alias = "asReal")]
808 pub fn Rf_asReal(x: SEXP) -> f64;
809 #[doc(alias = "asChar")]
810 pub fn Rf_asChar(x: SEXP) -> SEXP;
811 #[doc(alias = "coerceVector")]
812 pub fn Rf_coerceVector(v: SEXP, sexptype: SEXPTYPE) -> SEXP;
813
814 #[doc(alias = "nrows")]
816 pub fn Rf_nrows(x: SEXP) -> ::std::os::raw::c_int;
817 #[doc(alias = "ncols")]
818 pub fn Rf_ncols(x: SEXP) -> ::std::os::raw::c_int;
819
820 #[doc(alias = "inherits")]
822 pub fn Rf_inherits(x: SEXP, klass: *const ::std::os::raw::c_char) -> Rboolean;
823
824 #[doc(alias = "isNull")]
826 pub fn Rf_isNull(s: SEXP) -> Rboolean;
827 #[doc(alias = "isSymbol")]
828 pub fn Rf_isSymbol(s: SEXP) -> Rboolean;
829 #[doc(alias = "isLogical")]
830 pub fn Rf_isLogical(s: SEXP) -> Rboolean;
831 #[doc(alias = "isReal")]
832 pub fn Rf_isReal(s: SEXP) -> Rboolean;
833 #[doc(alias = "isComplex")]
834 pub fn Rf_isComplex(s: SEXP) -> Rboolean;
835 #[doc(alias = "isExpression")]
836 pub fn Rf_isExpression(s: SEXP) -> Rboolean;
837 #[doc(alias = "isEnvironment")]
838 pub fn Rf_isEnvironment(s: SEXP) -> Rboolean;
839 #[doc(alias = "isString")]
840 pub fn Rf_isString(s: SEXP) -> Rboolean;
841
842 #[doc(alias = "isArray")]
844 pub fn Rf_isArray(s: SEXP) -> Rboolean;
845 #[doc(alias = "isMatrix")]
846 pub fn Rf_isMatrix(s: SEXP) -> Rboolean;
847 #[doc(alias = "isList")]
848 pub fn Rf_isList(s: SEXP) -> Rboolean;
849 #[doc(alias = "isNewList")]
850 pub fn Rf_isNewList(s: SEXP) -> Rboolean;
851 #[doc(alias = "isPairList")]
852 pub fn Rf_isPairList(s: SEXP) -> Rboolean;
853 #[doc(alias = "isFunction")]
854 pub fn Rf_isFunction(s: SEXP) -> Rboolean;
855 #[doc(alias = "isPrimitive")]
856 pub fn Rf_isPrimitive(s: SEXP) -> Rboolean;
857 #[doc(alias = "isLanguage")]
858 pub fn Rf_isLanguage(s: SEXP) -> Rboolean;
859 #[doc(alias = "isDataFrame")]
860 pub fn Rf_isDataFrame(s: SEXP) -> Rboolean;
861 #[doc(alias = "isFactor")]
862 pub fn Rf_isFactor(s: SEXP) -> Rboolean;
863 #[doc(alias = "isInteger")]
864 pub fn Rf_isInteger(s: SEXP) -> Rboolean;
865 #[doc(alias = "isObject")]
866 pub fn Rf_isObject(s: SEXP) -> Rboolean;
867
868 #[doc(alias = "elt")]
870 pub fn Rf_elt(list: SEXP, i: ::std::os::raw::c_int) -> SEXP;
871 #[doc(alias = "lastElt")]
872 pub fn Rf_lastElt(list: SEXP) -> SEXP;
873 #[doc(alias = "nthcdr")]
874 pub fn Rf_nthcdr(list: SEXP, n: ::std::os::raw::c_int) -> SEXP;
875 #[doc(alias = "listAppend")]
876 pub fn Rf_listAppend(s: SEXP, t: SEXP) -> SEXP;
877
878 #[doc(alias = "classgets")]
892 pub fn Rf_classgets(vec: SEXP, klass: SEXP) -> SEXP;
893
894 #[doc(alias = "dimnamesgets")]
903 pub fn Rf_dimnamesgets(vec: SEXP, val: SEXP) -> SEXP;
904 #[doc(alias = "GetRowNames")]
906 pub(crate) fn Rf_GetRowNames(dimnames: SEXP) -> SEXP;
907 #[doc(alias = "GetColNames")]
908 pub(crate) fn Rf_GetColNames(dimnames: SEXP) -> SEXP;
909
910 #[cfg(r_4_5)]
919 #[doc(alias = "getVarEx")]
920 pub fn R_getVarEx(sym: SEXP, rho: SEXP, inherits: Rboolean, ifnotfound: SEXP) -> SEXP;
921 #[doc(alias = "defineVar")]
922 pub fn Rf_defineVar(symbol: SEXP, value: SEXP, rho: SEXP);
923 #[doc(alias = "setVar")]
924 pub fn Rf_setVar(symbol: SEXP, value: SEXP, rho: SEXP);
925 #[doc(alias = "findFun")]
926 pub fn Rf_findFun(symbol: SEXP, rho: SEXP) -> SEXP;
927
928 #[doc(alias = "FindNamespace")]
931 pub fn R_FindNamespace(info: SEXP) -> SEXP;
932
933 #[doc(alias = "GetCurrentEnv")]
937 pub(crate) fn R_GetCurrentEnv() -> SEXP;
938
939 #[doc(alias = "eval")]
941 pub fn Rf_eval(expr: SEXP, rho: SEXP) -> SEXP;
942 #[doc(alias = "applyClosure")]
943 pub fn Rf_applyClosure(
944 call: SEXP,
945 op: SEXP,
946 args: SEXP,
947 rho: SEXP,
948 suppliedvars: SEXP,
949 check: Rboolean,
950 ) -> SEXP;
951 pub fn R_tryEval(expr: SEXP, env: SEXP, error_occurred: *mut ::std::os::raw::c_int) -> SEXP;
952 #[doc(alias = "ToplevelExec")]
961 pub(crate) fn R_ToplevelExec(
962 fun: ::std::option::Option<unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void)>,
963 data: *mut ::std::os::raw::c_void,
964 ) -> Rboolean;
965 #[doc(alias = "tryCatchError")]
971 pub(crate) fn R_tryCatchError(
972 body: ::std::option::Option<
973 unsafe extern "C-unwind" fn(*mut ::std::os::raw::c_void) -> SEXP,
974 >,
975 bdata: *mut ::std::os::raw::c_void,
976 handler: ::std::option::Option<
977 unsafe extern "C-unwind" fn(SEXP, *mut ::std::os::raw::c_void) -> SEXP,
978 >,
979 hdata: *mut ::std::os::raw::c_void,
980 ) -> SEXP;
981 pub fn R_forceAndCall(e: SEXP, n: ::std::os::raw::c_int, rho: SEXP) -> SEXP;
982
983 #[doc(alias = "ParseVector")]
992 pub fn R_ParseVector(
993 text: SEXP,
994 n: ::std::os::raw::c_int,
995 status: *mut ParseStatus,
996 srcfile: SEXP,
997 ) -> SEXP;
998}
999
1000#[allow(non_camel_case_types)]
1007#[repr(i32)]
1008#[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::debug_c_like_enum_write_str(f,
"PARSE_NULL PARSE_OK PARSE_INCOMPLETE PARSE_ERROR PARSE_EOF",
match self {
ParseStatus::PARSE_NULL => 0usize,
ParseStatus::PARSE_OK => 11usize,
ParseStatus::PARSE_INCOMPLETE => 20usize,
ParseStatus::PARSE_ERROR => 37usize,
ParseStatus::PARSE_EOF => 49usize,
})
}
}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)]
1009pub enum ParseStatus {
1010 PARSE_NULL,
1012 PARSE_OK,
1014 PARSE_INCOMPLETE,
1016 PARSE_ERROR,
1018 PARSE_EOF,
1020}
1021
1022#[r_ffi_checked]
1036#[cfg(feature = "connections")]
1037unsafe extern "C-unwind" {
1038 pub(crate) fn R_new_custom_connection(
1050 description: *const ::std::os::raw::c_char,
1051 mode: *const ::std::os::raw::c_char,
1052 class_name: *const ::std::os::raw::c_char,
1053 ptr: *mut Rconnection,
1054 ) -> SEXP;
1055
1056 pub(crate) fn R_ReadConnection(
1067 con: Rconnection,
1068 buf: *mut ::std::os::raw::c_void,
1069 n: usize,
1070 ) -> usize;
1071
1072 pub(crate) fn R_WriteConnection(
1083 con: Rconnection,
1084 buf: *const ::std::os::raw::c_void,
1085 n: usize,
1086 ) -> usize;
1087
1088 pub(crate) fn R_GetConnection(sConn: SEXP) -> Rconnection;
1099}
1100#[allow(non_snake_case)]
1108pub unsafe fn Rf_isS4(arg1: SEXP) -> Rboolean {
1109 unsafe extern "C-unwind" {
1110 #[link_name = "Rf_isS4"]
1111 pub fn Rf_isS4_original(arg1: SEXP) -> u32;
1112 }
1113
1114 unsafe {
1115 if Rf_isS4_original(arg1) == 0 {
1116 Rboolean::FALSE
1117 } else {
1118 Rboolean::TRUE
1119 }
1120 }
1121}
1122
1123#[repr(C)]
1126#[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_struct_field1_finish(f, "DllInfo",
&&self.0)
}
}Debug)]
1127pub struct DllInfo(::std::os::raw::c_void);
1129
1130#[allow(non_camel_case_types)]
1140pub type DL_FUNC =
1141 ::std::option::Option<unsafe extern "C-unwind" fn() -> *mut ::std::os::raw::c_void>;
1142
1143#[allow(non_camel_case_types)]
1148pub type R_NativePrimitiveArgType = ::std::os::raw::c_uint;
1149
1150#[repr(C)]
1154#[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 fun numArgs types", &self.name, &self.fun,
&self.numArgs, &&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)]
1155#[allow(non_camel_case_types)]
1156#[allow(non_snake_case)]
1157pub struct R_CMethodDef {
1158 pub name: *const ::std::os::raw::c_char,
1160 pub fun: DL_FUNC,
1162 pub numArgs: ::std::os::raw::c_int,
1164 pub types: *const R_NativePrimitiveArgType,
1166}
1167
1168#[allow(non_camel_case_types)]
1172pub type R_FortranMethodDef = R_CMethodDef;
1173
1174#[repr(C)]
1179#[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 fun numArgs", &self.name, &self.fun,
&&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)]
1180#[allow(non_camel_case_types)]
1181#[allow(non_snake_case)]
1182pub struct R_CallMethodDef {
1183 pub name: *const ::std::os::raw::c_char,
1185 pub fun: DL_FUNC,
1187 pub numArgs: ::std::os::raw::c_int,
1189}
1190
1191unsafe impl Sync for R_CallMethodDef {}
1194unsafe impl Send for R_CallMethodDef {}
1195
1196#[allow(non_camel_case_types)]
1200pub type R_ExternalMethodDef = R_CallMethodDef;
1201
1202#[allow(missing_docs)]
1205#[allow(missing_docs)]
#[allow(clashing_extern_declarations)]
unsafe extern "C-unwind" {
#[doc = "Unchecked FFI binding for `R_registerRoutines`."]
#[doc = "Generated from source location line 1208, 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 1216, 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 1217, 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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 1208, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe {
R_registerRoutines_unchecked(info, croutines, callRoutines,
fortranRoutines, externalRoutines)
})
}
#[doc =
"Checked wrapper for `R_useDynamicSymbols`. Calls `R_useDynamicSymbols_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 1216, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_useDynamicSymbols_unchecked(info, value) })
}
#[doc =
"Checked wrapper for `R_forceSymbols`. Calls `R_forceSymbols_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 1217, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_forceSymbols_unchecked(info, value) })
}#[r_ffi_checked]
1206#[allow(clashing_extern_declarations)]
1207unsafe extern "C-unwind" {
1208 pub(crate) fn R_registerRoutines(
1209 info: *mut DllInfo,
1210 croutines: *const R_CMethodDef,
1211 callRoutines: *const R_CallMethodDef,
1212 fortranRoutines: *const R_FortranMethodDef,
1213 externalRoutines: *const R_ExternalMethodDef,
1214 ) -> ::std::os::raw::c_int;
1215
1216 pub(crate) fn R_useDynamicSymbols(info: *mut DllInfo, value: Rboolean) -> Rboolean;
1217 pub(crate) fn R_forceSymbols(info: *mut DllInfo, value: Rboolean) -> Rboolean;
1218}
1219
1220#[cfg(feature = "nonapi")]
1238pub mod nonapi_encoding {
1239 use super::r_ffi_checked;
1240
1241 #[r_ffi_checked]
1243 #[allow(clashing_extern_declarations)]
1244 unsafe extern "C-unwind" {
1245 pub(crate) static utf8locale: super::Rboolean;
1247 pub(crate) static mbcslocale: super::Rboolean;
1248 pub(crate) static known_to_be_latin1: super::Rboolean;
1249 }
1250}
1251
1252#[cfg(feature = "nonapi")]
1270pub mod nonapi_stack {
1271 unsafe extern "C" {
1272 #[allow(non_upper_case_globals)]
1277 pub(crate) static R_CStackStart: usize;
1278
1279 #[allow(non_upper_case_globals)]
1283 pub static R_CStackLimit: usize;
1284
1285 #[allow(non_upper_case_globals)]
1289 pub(crate) static R_CStackDir: ::std::os::raw::c_int;
1290 }
1291
1292 #[inline]
1297 pub unsafe fn set_r_cstack_limit(value: usize) {
1298 unsafe {
1299 let ptr = (&raw const R_CStackLimit).cast_mut();
1300 ptr.write(value);
1301 }
1302 }
1303
1304 #[inline]
1307 pub(crate) fn get_r_cstack_limit() -> usize {
1308 unsafe { R_CStackLimit }
1309 }
1310
1311 #[inline]
1313 pub(crate) fn get_r_cstack_start() -> usize {
1314 unsafe { R_CStackStart }
1315 }
1316
1317 #[inline]
1319 pub(crate) fn get_r_cstack_dir() -> ::std::os::raw::c_int {
1320 unsafe { R_CStackDir }
1321 }
1322}
1323
1324#[doc(alias = "mkString")]
1339#[allow(non_snake_case)]
1340#[inline]
1341pub unsafe fn Rf_mkString(s: *const ::std::os::raw::c_char) -> SEXP {
1342 unsafe {
1343 let charsxp = Rf_mkChar(s);
1344 let protected = Rf_protect(charsxp);
1345 let result = Rf_ScalarString(protected);
1346 Rf_unprotect(1);
1347 result
1348 }
1349}
1350
1351#[doc(alias = "list1")]
1361#[allow(non_snake_case)]
1362#[inline]
1363pub unsafe fn Rf_list1(s: SEXP) -> SEXP {
1364 unsafe { Rf_cons(s, R_NilValue) }
1365}
1366
1367#[doc(alias = "list2")]
1377#[allow(non_snake_case)]
1378#[inline]
1379pub unsafe fn Rf_list2(s: SEXP, t: SEXP) -> SEXP {
1380 unsafe { Rf_cons(s, Rf_cons(t, R_NilValue)) }
1381}
1382
1383#[doc(alias = "list3")]
1393#[allow(non_snake_case)]
1394#[inline]
1395pub unsafe fn Rf_list3(s: SEXP, t: SEXP, u: SEXP) -> SEXP {
1396 unsafe { Rf_cons(s, Rf_cons(t, Rf_cons(u, R_NilValue))) }
1397}
1398
1399#[doc(alias = "list4")]
1409#[allow(non_snake_case)]
1410#[inline]
1411pub unsafe fn Rf_list4(s: SEXP, t: SEXP, u: SEXP, v: SEXP) -> SEXP {
1412 unsafe { Rf_cons(s, Rf_cons(t, Rf_cons(u, Rf_cons(v, R_NilValue)))) }
1413}
1414
1415#[doc(alias = "lang1")]
1426#[allow(non_snake_case)]
1427#[inline]
1428pub unsafe fn Rf_lang1(s: SEXP) -> SEXP {
1429 unsafe { Rf_lcons(s, R_NilValue) }
1430}
1431
1432#[doc(alias = "lang2")]
1443#[allow(non_snake_case)]
1444#[inline]
1445pub unsafe fn Rf_lang2(s: SEXP, t: SEXP) -> SEXP {
1446 unsafe { Rf_lcons(s, Rf_list1(t)) }
1447}
1448
1449#[doc(alias = "lang3")]
1460#[allow(non_snake_case)]
1461#[inline]
1462pub unsafe fn Rf_lang3(s: SEXP, t: SEXP, u: SEXP) -> SEXP {
1463 unsafe { Rf_lcons(s, Rf_list2(t, u)) }
1464}
1465
1466#[doc(alias = "lang4")]
1477#[allow(non_snake_case)]
1478#[inline]
1479pub unsafe fn Rf_lang4(s: SEXP, t: SEXP, u: SEXP, v: SEXP) -> SEXP {
1480 unsafe { Rf_lcons(s, Rf_list3(t, u, v)) }
1481}
1482
1483#[doc(alias = "lang5")]
1494#[allow(non_snake_case)]
1495#[inline]
1496pub unsafe fn Rf_lang5(s: SEXP, t: SEXP, u: SEXP, v: SEXP, w: SEXP) -> SEXP {
1497 unsafe { Rf_lcons(s, Rf_list4(t, u, v, w)) }
1498}
1499
1500#[doc(alias = "lang6")]
1511#[allow(non_snake_case)]
1512#[inline]
1513pub unsafe fn Rf_lang6(s: SEXP, t: SEXP, u: SEXP, v: SEXP, w: SEXP, x: SEXP) -> SEXP {
1514 unsafe {
1515 let protected = Rf_protect(s);
1516 let list = Rf_cons(t, Rf_list4(u, v, w, x));
1517 let result = Rf_lcons(protected, list);
1518 Rf_unprotect(1);
1519 result
1520 }
1521}
1522
1523#[repr(u32)]
1529#[non_exhaustive]
1530#[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::debug_c_like_enum_write_str(f,
"WICHMANN_HILL MARSAGLIA_MULTICARRY SUPER_DUPER MERSENNE_TWISTER KNUTH_TAOCP USER_UNIF KNUTH_TAOCP2 LECUYER_CMRG",
match self {
RNGtype::WICHMANN_HILL => 0usize,
RNGtype::MARSAGLIA_MULTICARRY => 14usize,
RNGtype::SUPER_DUPER => 35usize,
RNGtype::MERSENNE_TWISTER => 47usize,
RNGtype::KNUTH_TAOCP => 64usize,
RNGtype::USER_UNIF => 76usize,
RNGtype::KNUTH_TAOCP2 => 86usize,
RNGtype::LECUYER_CMRG => 99usize,
})
}
}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)]
1531#[allow(non_camel_case_types)]
1532pub enum RNGtype {
1533 WICHMANN_HILL = 0,
1535 MARSAGLIA_MULTICARRY = 1,
1537 SUPER_DUPER = 2,
1539 MERSENNE_TWISTER = 3,
1541 KNUTH_TAOCP = 4,
1543 USER_UNIF = 5,
1545 KNUTH_TAOCP2 = 6,
1547 LECUYER_CMRG = 7,
1549}
1550
1551#[repr(u32)]
1553#[non_exhaustive]
1554#[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::debug_c_like_enum_write_str(f,
"BUGGY_KINDERMAN_RAMAGE AHRENS_DIETER BOX_MULLER USER_NORM INVERSION KINDERMAN_RAMAGE",
match self {
N01type::BUGGY_KINDERMAN_RAMAGE => 0usize,
N01type::AHRENS_DIETER => 23usize,
N01type::BOX_MULLER => 37usize,
N01type::USER_NORM => 48usize,
N01type::INVERSION => 58usize,
N01type::KINDERMAN_RAMAGE => 68usize,
})
}
}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)]
1555#[allow(non_camel_case_types)]
1556pub enum N01type {
1557 BUGGY_KINDERMAN_RAMAGE = 0,
1559 AHRENS_DIETER = 1,
1561 BOX_MULLER = 2,
1563 USER_NORM = 3,
1565 INVERSION = 4,
1567 KINDERMAN_RAMAGE = 5,
1569}
1570
1571#[repr(u32)]
1573#[non_exhaustive]
1574#[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)]
1575#[allow(non_camel_case_types)]
1576pub enum Sampletype {
1577 ROUNDING = 0,
1579 REJECTION = 1,
1581}
1582
1583unsafe 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 1602, 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 1608, 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 1616, 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 1624, 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 1632, 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 1642, 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 1645, 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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 1602, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn GetRNGstate() {
::miniextendr_api::with_r_thread(move ||
unsafe { 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 =
"Checked wrapper for `PutRNGstate`. Calls `PutRNGstate_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 1608, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn PutRNGstate() {
::miniextendr_api::with_r_thread(move ||
unsafe { 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 =
"Checked wrapper for `unif_rand`. Calls `unif_rand_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 1616, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn unif_rand() -> f64 {
::miniextendr_api::with_r_thread(move || unsafe { unif_rand_unchecked() })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 1624, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn norm_rand() -> f64 {
::miniextendr_api::with_r_thread(move || unsafe { norm_rand_unchecked() })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 1632, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn exp_rand() -> f64 {
::miniextendr_api::with_r_thread(move || unsafe { exp_rand_unchecked() })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 1642, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_unif_index_unchecked(dn) })
}
#[doc = " Get the current discrete uniform sample method."]
#[doc =
"Checked wrapper for `R_sample_kind`. Calls `R_sample_kind_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 1645, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_sample_kind_unchecked() })
}#[r_ffi_checked]
1584unsafe extern "C-unwind" {
1585 pub fn GetRNGstate();
1603
1604 pub fn PutRNGstate();
1609
1610 pub fn unif_rand() -> f64;
1617
1618 pub fn norm_rand() -> f64;
1625
1626 pub fn exp_rand() -> f64;
1633
1634 pub fn R_unif_index(dn: f64) -> f64;
1643
1644 pub fn R_sample_kind() -> Sampletype;
1646}
1647
1648unsafe 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 the main-thread check only, not an"]
#[doc = " unwind guard."]
#[doc = "Unchecked FFI binding for `Rf_dnorm4`."]
#[doc = "Generated from source location line 1683, 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 the main-thread check only, not an"]
#[doc = " unwind guard."]
#[doc = "Unchecked FFI binding for `Rf_pnorm5`."]
#[doc = "Generated from source location line 1703, 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 the main-thread check only, not an"]
#[doc = " unwind guard."]
#[doc = "Unchecked FFI binding for `Rf_qnorm5`."]
#[doc = "Generated from source location line 1731, 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 the main-thread check only, not an"]
#[doc = " unwind guard."]
#[doc = "Unchecked FFI binding for `Rf_qchisq`."]
#[doc = "Generated from source location line 1759, 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 the main-thread check only, not an"]
#[doc = " unwind guard."]
#[doc =
"Checked wrapper for `Rf_dnorm4`. Calls `Rf_dnorm4_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 1683, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_dnorm4_unchecked(x, mu, sigma, give_log) })
}
#[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 the main-thread check only, not an"]
#[doc = " unwind guard."]
#[doc =
"Checked wrapper for `Rf_pnorm5`. Calls `Rf_pnorm5_unchecked` inside `with_r_thread`, which panics off R's main 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_pnorm5(x: f64, mu: f64, sigma: f64,
lower_tail: ::std::os::raw::c_int, log_p: ::std::os::raw::c_int) -> f64 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_pnorm5_unchecked(x, mu, sigma, lower_tail, log_p) })
}
#[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 the main-thread check only, not an"]
#[doc = " unwind guard."]
#[doc =
"Checked wrapper for `Rf_qnorm5`. Calls `Rf_qnorm5_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 1731, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_qnorm5_unchecked(p, mu, sigma, lower_tail, log_p) })
}
#[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 the main-thread check only, not an"]
#[doc = " unwind guard."]
#[doc =
"Checked wrapper for `Rf_qchisq`. Calls `Rf_qchisq_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 1759, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_qchisq_unchecked(p, df, lower_tail, log_p) })
}#[r_ffi_checked]
1665unsafe extern "C-unwind" {
1666 pub fn Rf_dnorm4(x: f64, mu: f64, sigma: f64, give_log: ::std::os::raw::c_int) -> f64;
1684
1685 pub fn Rf_pnorm5(
1704 x: f64,
1705 mu: f64,
1706 sigma: f64,
1707 lower_tail: ::std::os::raw::c_int,
1708 log_p: ::std::os::raw::c_int,
1709 ) -> f64;
1710
1711 pub fn Rf_qnorm5(
1732 p: f64,
1733 mu: f64,
1734 sigma: f64,
1735 lower_tail: ::std::os::raw::c_int,
1736 log_p: ::std::os::raw::c_int,
1737 ) -> f64;
1738
1739 pub fn Rf_qchisq(
1760 p: f64,
1761 df: f64,
1762 lower_tail: ::std::os::raw::c_int,
1763 log_p: ::std::os::raw::c_int,
1764 ) -> f64;
1765}
1766
1767#[allow(non_camel_case_types)]
1789pub type optimfn = unsafe extern "C-unwind" fn(
1790 n: ::std::os::raw::c_int,
1791 par: *mut f64,
1792 ex: *mut ::std::os::raw::c_void,
1793) -> f64;
1794
1795#[allow(non_camel_case_types)]
1803pub type optimgr = unsafe extern "C-unwind" fn(
1804 n: ::std::os::raw::c_int,
1805 par: *mut f64,
1806 gr: *mut f64,
1807 ex: *mut ::std::os::raw::c_void,
1808);
1809
1810unsafe 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 the main-thread check 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 1874, 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 the main-thread check 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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 1874, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe {
lbfgsb_unchecked(n, m, x, l, u, nbd, fmin, fn_, gr, fail, ex,
factr, pgtol, fncount, grcount, maxit, msg, trace, nreport)
})
}#[r_ffi_checked]
1811unsafe extern "C-unwind" {
1812 #[allow(clippy::too_many_arguments)]
1874 pub fn lbfgsb(
1875 n: ::std::os::raw::c_int,
1876 m: ::std::os::raw::c_int,
1877 x: *mut f64,
1878 l: *mut f64,
1879 u: *mut f64,
1880 nbd: *mut ::std::os::raw::c_int,
1881 fmin: *mut f64,
1882 fn_: optimfn,
1883 gr: optimgr,
1884 fail: *mut ::std::os::raw::c_int,
1885 ex: *mut ::std::os::raw::c_void,
1886 factr: f64,
1887 pgtol: f64,
1888 fncount: *mut ::std::os::raw::c_int,
1889 grcount: *mut ::std::os::raw::c_int,
1890 maxit: ::std::os::raw::c_int,
1891 msg: *mut ::std::os::raw::c_char,
1892 trace: ::std::os::raw::c_int,
1893 nreport: ::std::os::raw::c_int,
1894 );
1895}
1896
1897#[allow(non_camel_case_types)]
1949#[cfg(feature = "blas-lapack")]
1950pub type FC_LEN_T = usize;
1951
1952#[cfg(feature = "blas-lapack")]
1954const _: () = assert!(
1955 ::std::mem::size_of::<::std::os::raw::c_int>() == 4,
1956 "R's BLAS/LAPACK use a 32-bit INTEGER (C int); ILP64 is not supported"
1957);
1958
1959#[cfg(feature = "blas-lapack")]
1960#[r_ffi_checked]
1961unsafe extern "C-unwind" {
1962 #[allow(clippy::too_many_arguments)]
2009 pub fn dgemm_(
2010 transa: *const ::std::os::raw::c_char,
2011 transb: *const ::std::os::raw::c_char,
2012 m: *const ::std::os::raw::c_int,
2013 n: *const ::std::os::raw::c_int,
2014 k: *const ::std::os::raw::c_int,
2015 alpha: *const f64,
2016 a: *const f64,
2017 lda: *const ::std::os::raw::c_int,
2018 b: *const f64,
2019 ldb: *const ::std::os::raw::c_int,
2020 beta: *const f64,
2021 c: *mut f64,
2022 ldc: *const ::std::os::raw::c_int,
2023 transa_len: FC_LEN_T,
2024 transb_len: FC_LEN_T,
2025 );
2026
2027 #[allow(clippy::too_many_arguments)]
2071 pub fn dgesv_(
2072 n: *const ::std::os::raw::c_int,
2073 nrhs: *const ::std::os::raw::c_int,
2074 a: *mut f64,
2075 lda: *const ::std::os::raw::c_int,
2076 ipiv: *mut ::std::os::raw::c_int,
2077 b: *mut f64,
2078 ldb: *const ::std::os::raw::c_int,
2079 info: *mut ::std::os::raw::c_int,
2080 );
2081}
2082
2083unsafe 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 2105, 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 2113, 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 2118, 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 2123, 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 2138, 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 2145, 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 2153, 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 2163, 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 2174, 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 2180, 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 2186, 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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2105, 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 {
::miniextendr_api::with_r_thread(move || unsafe { vmaxget_unchecked() })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2113, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { vmaxset_unchecked(ovmax) })
}
#[doc = " Run the R garbage collector."]
#[doc = ""]
#[doc = " Forces a full garbage collection cycle."]
#[doc =
"Checked wrapper for `R_gc`. Calls `R_gc_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2118, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_gc() {
::miniextendr_api::with_r_thread(move || unsafe { R_gc_unchecked() })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2123, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_gc_running_unchecked() })
}
#[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` inside `with_r_thread`, which panics off R's main 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_alloc(nelem: usize, eltsize: ::std::os::raw::c_int)
-> *mut ::std::os::raw::c_char {
::miniextendr_api::with_r_thread(move ||
unsafe { R_alloc_unchecked(nelem, eltsize) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2145, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_allocLD_unchecked(nelem) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2153, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { S_alloc_unchecked(nelem, eltsize) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2163, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { S_realloc_unchecked(ptr, newsize, oldsize, eltsize) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2174, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_malloc_gc_unchecked(size) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2180, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_calloc_gc_unchecked(nelem, eltsize) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2186, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_realloc_gc_unchecked(ptr, size) })
}#[r_ffi_checked]
2088unsafe extern "C-unwind" {
2089 pub fn vmaxget() -> *mut ::std::os::raw::c_void;
2106
2107 pub fn vmaxset(ovmax: *const ::std::os::raw::c_void);
2114
2115 pub fn R_gc();
2119
2120 pub fn R_gc_running() -> ::std::os::raw::c_int;
2124
2125 pub fn R_alloc(nelem: usize, eltsize: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char;
2139
2140 pub fn R_allocLD(nelem: usize) -> *mut f64; pub fn S_alloc(
2154 nelem: ::std::os::raw::c_long,
2155 eltsize: ::std::os::raw::c_int,
2156 ) -> *mut ::std::os::raw::c_char;
2157
2158 pub fn S_realloc(
2164 ptr: *mut ::std::os::raw::c_char,
2165 newsize: ::std::os::raw::c_long,
2166 oldsize: ::std::os::raw::c_long,
2167 eltsize: ::std::os::raw::c_int,
2168 ) -> *mut ::std::os::raw::c_char;
2169
2170 pub fn R_malloc_gc(size: usize) -> *mut ::std::os::raw::c_void;
2175
2176 pub fn R_calloc_gc(nelem: usize, eltsize: usize) -> *mut ::std::os::raw::c_void;
2181
2182 pub fn R_realloc_gc(
2187 ptr: *mut ::std::os::raw::c_void,
2188 size: usize,
2189 ) -> *mut ::std::os::raw::c_void;
2190}
2191
2192unsafe 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 2204, 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 2212, 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 2220, 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 2230, 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 2239, 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 2253, 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 2267, 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 2277, 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 2286, 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 2296, 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 2310, 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 2320, 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 2332, 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 2337, 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 2342, 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 2355, 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 2371, 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 2378, 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 2383, 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 2390, 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 2409, 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 2421, 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 2441, 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 2453, 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 2459, 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 2463, 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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2204, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_isort_unchecked(x, n) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2212, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_rsort_unchecked(x, n) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2220, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_csort_unchecked(x, n) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2230, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { revsort_unchecked(a, ib, n) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2239, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { rsort_with_index_unchecked(x, indx, n) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2253, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { iPsort_unchecked(x, n, k) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2267, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { rPsort_unchecked(x, n, k) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2277, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { cPsort_unchecked(x, n, k) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2286, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_qsort_unchecked(v, i, j) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2296, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_qsort_I_unchecked(v, indx, i, j) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2310, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_qsort_int_unchecked(iv, i, j) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2320, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_qsort_int_I_unchecked(iv, indx, i, j) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2332, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_ExpandFileName_unchecked(s) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2337, 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 {
::miniextendr_api::with_r_thread(move || unsafe { R_atof_unchecked(str) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2342, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_strtod_unchecked(c, end) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2355, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_tmpnam_unchecked(prefix, tempdir) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2371, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_tmpnam2_unchecked(prefix, tempdir, fileext) })
}
#[doc = " Free a temporary filename allocated by `R_tmpnam` or `R_tmpnam2`."]
#[doc =
"Checked wrapper for `R_free_tmpnam`. Calls `R_free_tmpnam_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2378, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_free_tmpnam_unchecked(name) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2383, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_CheckStack() {
::miniextendr_api::with_r_thread(move ||
unsafe { R_CheckStack_unchecked() })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2390, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_CheckStack2_unchecked(extra) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2409, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe {
findInterval_unchecked(xt, n, x, rightmost_closed, all_inside,
ilo, mflag)
})
}
#[doc = " Extended interval finding with left-open option."]
#[allow(clippy::too_many_arguments)]
#[doc =
"Checked wrapper for `findInterval2`. Calls `findInterval2_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2421, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe {
findInterval2_unchecked(xt, n, x, rightmost_closed,
all_inside, left_open, ilo, mflag)
})
}
#[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` inside `with_r_thread`, which panics off R's main 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 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_max_col_unchecked(matrix, nr, nc, maxes, ties_meth) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2453, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { StringFalse_unchecked(s) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2459, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { StringTrue_unchecked(s) })
}
#[doc = " Check if a string is blank (empty or only whitespace)."]
#[doc(alias = "Rf_isBlankString")]
#[doc =
"Checked wrapper for `isBlankString`. Calls `isBlankString_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2463, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { isBlankString_unchecked(s) })
}#[r_ffi_checked]
2197unsafe extern "C-unwind" {
2198 pub fn R_isort(x: *mut ::std::os::raw::c_int, n: ::std::os::raw::c_int);
2205
2206 pub fn R_rsort(x: *mut f64, n: ::std::os::raw::c_int);
2213
2214 pub fn R_csort(x: *mut Rcomplex, n: ::std::os::raw::c_int);
2221
2222 #[doc(alias = "Rf_revsort")]
2230 pub fn revsort(a: *mut f64, ib: *mut ::std::os::raw::c_int, n: ::std::os::raw::c_int);
2231
2232 pub fn rsort_with_index(
2240 x: *mut f64,
2241 indx: *mut ::std::os::raw::c_int,
2242 n: ::std::os::raw::c_int,
2243 );
2244
2245 #[doc(alias = "Rf_iPsort")]
2253 pub fn iPsort(
2254 x: *mut ::std::os::raw::c_int,
2255 n: ::std::os::raw::c_int,
2256 k: ::std::os::raw::c_int,
2257 );
2258
2259 #[doc(alias = "Rf_rPsort")]
2267 pub fn rPsort(x: *mut f64, n: ::std::os::raw::c_int, k: ::std::os::raw::c_int);
2268
2269 #[doc(alias = "Rf_cPsort")]
2277 pub fn cPsort(x: *mut Rcomplex, n: ::std::os::raw::c_int, k: ::std::os::raw::c_int);
2278
2279 pub fn R_qsort(v: *mut f64, i: usize, j: usize);
2287
2288 pub fn R_qsort_I(
2297 v: *mut f64,
2298 indx: *mut ::std::os::raw::c_int,
2299 i: ::std::os::raw::c_int,
2300 j: ::std::os::raw::c_int,
2301 );
2302
2303 pub fn R_qsort_int(iv: *mut ::std::os::raw::c_int, i: usize, j: usize);
2311
2312 pub fn R_qsort_int_I(
2321 iv: *mut ::std::os::raw::c_int,
2322 indx: *mut ::std::os::raw::c_int,
2323 i: ::std::os::raw::c_int,
2324 j: ::std::os::raw::c_int,
2325 );
2326
2327 pub fn R_ExpandFileName(s: *const ::std::os::raw::c_char) -> *const ::std::os::raw::c_char;
2333
2334 pub fn R_atof(str: *const ::std::os::raw::c_char) -> f64;
2338
2339 pub fn R_strtod(c: *const ::std::os::raw::c_char, end: *mut *mut ::std::os::raw::c_char)
2343 -> f64;
2344
2345 pub fn R_tmpnam(
2356 prefix: *const ::std::os::raw::c_char,
2357 tempdir: *const ::std::os::raw::c_char,
2358 ) -> *mut ::std::os::raw::c_char;
2359
2360 pub fn R_tmpnam2(
2372 prefix: *const ::std::os::raw::c_char,
2373 tempdir: *const ::std::os::raw::c_char,
2374 fileext: *const ::std::os::raw::c_char,
2375 ) -> *mut ::std::os::raw::c_char;
2376
2377 pub fn R_free_tmpnam(name: *mut ::std::os::raw::c_char);
2379
2380 pub fn R_CheckStack();
2384
2385 pub fn R_CheckStack2(extra: usize);
2391
2392 pub fn findInterval(
2410 xt: *const f64,
2411 n: ::std::os::raw::c_int,
2412 x: f64,
2413 rightmost_closed: Rboolean,
2414 all_inside: Rboolean,
2415 ilo: ::std::os::raw::c_int,
2416 mflag: *mut ::std::os::raw::c_int,
2417 ) -> ::std::os::raw::c_int;
2418
2419 #[allow(clippy::too_many_arguments)]
2421 pub fn findInterval2(
2422 xt: *const f64,
2423 n: ::std::os::raw::c_int,
2424 x: f64,
2425 rightmost_closed: Rboolean,
2426 all_inside: Rboolean,
2427 left_open: Rboolean,
2428 ilo: ::std::os::raw::c_int,
2429 mflag: *mut ::std::os::raw::c_int,
2430 ) -> ::std::os::raw::c_int;
2431
2432 pub fn R_max_col(
2442 matrix: *const f64,
2443 nr: *const ::std::os::raw::c_int,
2444 nc: *const ::std::os::raw::c_int,
2445 maxes: *mut ::std::os::raw::c_int,
2446 ties_meth: *const ::std::os::raw::c_int,
2447 );
2448
2449 #[doc(alias = "Rf_StringFalse")]
2453 pub fn StringFalse(s: *const ::std::os::raw::c_char) -> Rboolean;
2454
2455 #[doc(alias = "Rf_StringTrue")]
2459 pub fn StringTrue(s: *const ::std::os::raw::c_char) -> Rboolean;
2460
2461 #[doc(alias = "Rf_isBlankString")]
2463 pub fn isBlankString(s: *const ::std::os::raw::c_char) -> Rboolean;
2464}
2465
2466unsafe 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 2482, 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 2497, 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 2509, 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 2515, 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 2527, 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 2532, 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 2539, 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 2546, 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 2564, 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 2572, 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 2585, 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 2596, 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 2600, 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 2612, 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 2618, 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 2624, 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 2630, 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 2634, 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 2643, 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 2651, 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 2657, 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 2661, 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 2671, 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 2682, 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 2694, 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 2697, 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 2700, 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 2703, 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 2706, 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 2712, 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 2716, 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 2724, 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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2482, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_mkCharCE_unchecked(s, encoding) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2497, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_nchar_unchecked(x, ntype, allowNA, keepNA, msg_name) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2509, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_type2char_unchecked(sexptype) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2515, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_PrintValue_unchecked(x) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2527, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_NewEnv_unchecked(enclos, hash, size) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2532, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_existsVarInFrame_unchecked(rho, symbol) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2539, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_removeVarFromFrame_unchecked(symbol, env) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2546, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_topenv_unchecked(target, envir) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2564, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_match_unchecked(x, table, nomatch) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2572, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_copyMostAttrib_unchecked(source, target) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2585, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_any_duplicated_unchecked(x, fromLast) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2596, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_asS4_unchecked(object, flag, complete) })
}
#[doc = " Get the S3 class of an S4 object."]
#[doc(alias = "S3Class")]
#[doc =
"Checked wrapper for `Rf_S3Class`. Calls `Rf_S3Class_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2600, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_S3Class_unchecked(object) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2612, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_GetOption1_unchecked(tag) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2618, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_GetOptionDigits_unchecked() })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2624, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_GetOptionWidth_unchecked() })
}
#[doc = " Check if a factor is ordered."]
#[doc(alias = "isOrdered")]
#[doc =
"Checked wrapper for `Rf_isOrdered`. Calls `Rf_isOrdered_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2630, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isOrdered_unchecked(s) })
}
#[doc = " Check if a factor is unordered."]
#[doc(alias = "isUnordered")]
#[doc =
"Checked wrapper for `Rf_isUnordered`. Calls `Rf_isUnordered_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2634, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isUnordered_unchecked(s) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2643, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_isUnsorted_unchecked(x, strictly) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2651, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_substitute_unchecked(lang, rho) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2657, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_lengthgets_unchecked(x, newlen) })
}
#[doc = " Set vector length (long vector version)."]
#[doc(alias = "xlengthgets")]
#[doc =
"Checked wrapper for `Rf_xlengthgets`. Calls `Rf_xlengthgets_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2661, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_xlengthgets_unchecked(x, newlen) })
}
#[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` inside `with_r_thread`, which panics off R's main 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 R_ProtectWithIndex(s: SEXP, index: *mut ::std::os::raw::c_int) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_ProtectWithIndex_unchecked(s, index) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2682, 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) {
::miniextendr_api::with_r_thread(move ||
unsafe { R_Reprotect_unchecked(s, index) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2694, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_MakeWeakRef_unchecked(key, val, fin, onexit) })
}
#[doc = " Create a weak reference with C finalizer."]
#[doc =
"Checked wrapper for `R_MakeWeakRefC`. Calls `R_MakeWeakRefC_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2697, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_MakeWeakRefC_unchecked(key, val, fin, onexit) })
}
#[doc = " Get the key from a weak reference."]
#[doc =
"Checked wrapper for `R_WeakRefKey`. Calls `R_WeakRefKey_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2700, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_WeakRefKey_unchecked(w) })
}
#[doc = " Get the value from a weak reference."]
#[doc =
"Checked wrapper for `R_WeakRefValue`. Calls `R_WeakRefValue_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2703, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { R_WeakRefValue_unchecked(w) })
}
#[doc = " Run pending finalizers."]
#[doc =
"Checked wrapper for `R_RunPendingFinalizers`. Calls `R_RunPendingFinalizers_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2706, column 12."]
#[doc = "Generated from source file `miniextendr-api/src/sys.rs`."]
#[inline(always)]
#[allow(non_snake_case)]
pub unsafe fn R_RunPendingFinalizers() {
::miniextendr_api::with_r_thread(move ||
unsafe { R_RunPendingFinalizers_unchecked() })
}
#[doc = " Convert a pairlist to a generic vector (list)."]
#[doc(alias = "PairToVectorList")]
#[doc =
"Checked wrapper for `Rf_PairToVectorList`. Calls `Rf_PairToVectorList_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2712, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_PairToVectorList_unchecked(x) })
}
#[doc = " Convert a generic vector (list) to a pairlist."]
#[doc(alias = "VectorToPairList")]
#[doc =
"Checked wrapper for `Rf_VectorToPairList`. Calls `Rf_VectorToPairList_unchecked` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2716, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_VectorToPairList_unchecked(x) })
}
#[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` inside `with_r_thread`, which panics off R's main thread."]
#[doc = "Generated from source location line 2724, 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 {
::miniextendr_api::with_r_thread(move ||
unsafe { Rf_installChar_unchecked(x) })
}#[r_ffi_checked]
2471unsafe extern "C-unwind" {
2472 #[doc(alias = "mkCharCE")]
2482 pub(crate) fn Rf_mkCharCE(s: *const ::std::os::raw::c_char, encoding: cetype_t) -> SEXP;
2483
2484 pub fn R_nchar(
2498 x: SEXP,
2499 ntype: ::std::os::raw::c_int,
2500 allowNA: Rboolean,
2501 keepNA: Rboolean,
2502 msg_name: *const ::std::os::raw::c_char,
2503 ) -> ::std::os::raw::c_int;
2504
2505 #[doc(alias = "type2char")]
2509 pub fn Rf_type2char(sexptype: SEXPTYPE) -> *const ::std::os::raw::c_char;
2510
2511 #[doc(alias = "PrintValue")]
2515 pub fn Rf_PrintValue(x: SEXP);
2516
2517 pub(crate) fn R_NewEnv(enclos: SEXP, hash: Rboolean, size: ::std::os::raw::c_int) -> SEXP;
2528
2529 pub fn R_existsVarInFrame(rho: SEXP, symbol: SEXP) -> Rboolean;
2533
2534 pub fn R_removeVarFromFrame(symbol: SEXP, env: SEXP) -> SEXP;
2540
2541 #[doc(alias = "topenv")]
2546 pub fn Rf_topenv(target: SEXP, envir: SEXP) -> SEXP;
2547
2548 #[doc(alias = "match")]
2564 pub fn Rf_match(x: SEXP, table: SEXP, nomatch: ::std::os::raw::c_int) -> SEXP;
2565
2566 #[doc(alias = "copyMostAttrib")]
2572 pub fn Rf_copyMostAttrib(source: SEXP, target: SEXP);
2573
2574 #[doc(alias = "any_duplicated")]
2585 pub fn Rf_any_duplicated(x: SEXP, fromLast: Rboolean) -> R_xlen_t;
2586
2587 #[doc(alias = "asS4")]
2596 pub fn Rf_asS4(object: SEXP, flag: Rboolean, complete: ::std::os::raw::c_int) -> SEXP;
2597
2598 #[doc(alias = "S3Class")]
2600 pub fn Rf_S3Class(object: SEXP) -> SEXP;
2601
2602 #[doc(alias = "GetOption1")]
2612 pub fn Rf_GetOption1(tag: SEXP) -> SEXP;
2613
2614 #[doc(alias = "GetOptionDigits")]
2618 pub fn Rf_GetOptionDigits() -> ::std::os::raw::c_int;
2619
2620 #[doc(alias = "GetOptionWidth")]
2624 pub(crate) fn Rf_GetOptionWidth() -> ::std::os::raw::c_int;
2625
2626 #[doc(alias = "isOrdered")]
2630 pub fn Rf_isOrdered(s: SEXP) -> Rboolean;
2631
2632 #[doc(alias = "isUnordered")]
2634 pub fn Rf_isUnordered(s: SEXP) -> Rboolean;
2635
2636 #[doc(alias = "isUnsorted")]
2643 pub fn Rf_isUnsorted(x: SEXP, strictly: Rboolean) -> ::std::os::raw::c_int;
2644
2645 #[doc(alias = "substitute")]
2651 pub fn Rf_substitute(lang: SEXP, rho: SEXP) -> SEXP;
2652
2653 #[doc(alias = "lengthgets")]
2657 pub fn Rf_lengthgets(x: SEXP, newlen: R_xlen_t) -> SEXP;
2658
2659 #[doc(alias = "xlengthgets")]
2661 pub fn Rf_xlengthgets(x: SEXP, newlen: R_xlen_t) -> SEXP;
2662
2663 #[doc(alias = "PROTECT_WITH_INDEX")]
2671 pub fn R_ProtectWithIndex(s: SEXP, index: *mut ::std::os::raw::c_int);
2672
2673 #[doc(alias = "REPROTECT")]
2682 pub fn R_Reprotect(s: SEXP, index: ::std::os::raw::c_int);
2683
2684 pub fn R_MakeWeakRef(key: SEXP, val: SEXP, fin: SEXP, onexit: Rboolean) -> SEXP;
2695
2696 pub fn R_MakeWeakRefC(key: SEXP, val: SEXP, fin: R_CFinalizer_t, onexit: Rboolean) -> SEXP;
2698
2699 pub fn R_WeakRefKey(w: SEXP) -> SEXP;
2701
2702 pub fn R_WeakRefValue(w: SEXP) -> SEXP;
2704
2705 pub fn R_RunPendingFinalizers();
2707
2708 #[doc(alias = "PairToVectorList")]
2712 pub fn Rf_PairToVectorList(x: SEXP) -> SEXP;
2713
2714 #[doc(alias = "VectorToPairList")]
2716 pub fn Rf_VectorToPairList(x: SEXP) -> SEXP;
2717
2718 #[doc(alias = "installChar")]
2724 pub fn Rf_installChar(x: SEXP) -> SEXP;
2725}
2726
2727