Skip to main content

altstring_cache_written

Function altstring_cache_written 

Source
pub(crate) unsafe fn altstring_cache_written(cache: SEXP) -> bool
Expand description

Whether R has stored a value into a string ALTREP’s cache.

Reads fill the cache too, with values computed from the Rust data, so a cache alone doesn’t mean the Rust data is stale. Set_elt and a writable Dataptr mark it before R can store into it, so the mark errs towards written.

§Safety

cache is a string ALTREP’s data2 cache, on R’s main thread.