Skip to main content

insert_unchecked

Function insert_unchecked 

Source
pub unsafe fn insert_unchecked(x: SEXP) -> SEXP
Expand description

Insert a SEXP into the preservation list (unchecked version).

Skips thread safety checks for performance-critical paths. Otherwise identical to insert.

§Safety

Must be called from the R main thread. Only use in contexts where you’re certain you’re on the main thread (ALTREP callbacks, extern “C-unwind” functions). The returned cell must eventually be passed to release_unchecked.