Skip to main content

materialize_altrep_data2

Function materialize_altrep_data2 

Source
pub unsafe fn materialize_altrep_data2<T: RNativeType>(x: SEXP) -> *mut c_void
Expand description

Materialize an ALTREP SEXP into a plain R vector in data2.

Called by __impl_altvec_dataptr when the custom dataptr() returns None. Allocates a destination vector via alloc_r_vector_unchecked, fills it from T::elt() (which goes through R’s ALTREP Elt dispatch), stores in data2, and returns DATAPTR of data2.

§Safety

  • x must be a valid ALTREP SEXP of element type T
  • Must be called on R’s main thread