Skip to main content

copy_sidecar_slots

Function copy_sidecar_slots 

Source
pub(super) unsafe fn copy_sidecar_slots<T: TypedExternal>(
    source: SEXP,
    target: SEXP,
)
Expand description

Copies every Sidecar slot of the pointer source into the pointer target: the two share the R values until one side writes a field.

§Safety

On R’s main thread; both must be live EXTPTRSXPs built by ExternalPtr for a T. set_vector_elt allocates nothing.