Skip to main content

altrep_data1_mut_unchecked

Function altrep_data1_mut_unchecked 

Source
pub unsafe fn altrep_data1_mut_unchecked<T: TypedExternal>(
    x: SEXP,
) -> Option<&'static mut T>
Expand description

Get a mutable reference to data in ALTREP data1 slot (unchecked version).

Skips thread safety checks for performance-critical ALTREP callbacks.

ยงSafety

  • x must be a valid ALTREP SEXP
  • Must be called from the R main thread (guaranteed in ALTREP callbacks)
  • The caller must ensure no other references to the data exist