Skip to main content

duplicate_altrep_owner

Function duplicate_altrep_owner 

Source
#[doc(hidden)]
pub unsafe fn duplicate_altrep_owner<T>(x: SEXP) -> SEXP
Expand description

Clone a derive-generated ALTREP owner while preserving its current R cache. R’s default DuplicateEX copies attributes and object flags after this hook.

§Safety

x must be a rooted ALTREP of T with ExternalPtr data1, on R’s thread. T::clone must detach any allocation that this class exposes for R writes.