pub unsafe fn R_ProtectWithIndex(s: SEXP, index: *mut c_int)Expand description
Protect a SEXP and record its stack index for later R_Reprotect.
Cost: O(1) — same array write as Rf_protect, plus stores the index.
No allocation. Use when you need to replace a protected value in-place
(e.g., inside a loop that allocates) without unprotect/re-protect churn.
Checked wrapper for R_ProtectWithIndex. Calls R_ProtectWithIndex_unchecked inside with_r_thread, which panics off R’s main thread.
Generated from source location line 2671, column 12.
Generated from source file miniextendr-api/src/sys.rs.