Skip to main content

altlist_set_elt

Function altlist_set_elt 

Source
#[doc(hidden)]
pub unsafe fn altlist_set_elt<T>(x: SEXP, i: R_xlen_t, v: SEXP)
where T: AltList,
Expand description

Set_elt for bridge-generated list ALTREPs; R’s default raises an error.

The first write copies every element into a plain list in data2. From then on that list holds the vector’s values: Elt and Length read it, Duplicate copies it, and serialization leaves the vector to R.

§Safety

x is a live list ALTREP of T on R’s main thread, v a valid SEXP and 0 <= i < length.