Skip to main content

Rf_protect_unchecked

Function Rf_protect_unchecked 

Source
pub unsafe extern "C-unwind" fn Rf_protect_unchecked(s: SEXP) -> SEXP
Expand description

Add a SEXP to the protect stack, preventing GC collection.

Cost: O(1) — single array write (R_PPStack[top++] = s). No allocation.

Must be balanced by a corresponding Rf_unprotect. The protect stack is LIFO — nested scopes are safe, but interleaved usage from different scopes will cause incorrect unprotection. Unchecked FFI binding for Rf_protect. Generated from source location line 2087, column 12. Generated from source file miniextendr-api/src/ffi.rs.