search for: set_intseq_data

Displaying 1 result from an estimated 1 matches for "set_intseq_data".

2018 Oct 22
1
v3 serialization of compact_intseq altrep should write modified data
...integer sequence in memory. If you modify this data, the object values appear to be changed. However, if the compact_intseq object is then serialized (with version=3), only the original integer sequence info is written. For example, suppose I have compiled and loaded the following C code: SEXP set_intseq_data(SEXP x) { void* ptr = DATAPTR(x); ((int*)ptr)[3] = 1234; return R_NilValue; } I see the following behavior in R 3.5.1: > x <- 1:10 > x [1] 1 2 3 4 5 6 7 8 9 10 > .Call("set_intseq_data", x) NULL > x [1] 1 2 3 1234...