| 550 | static void* Dataptr(SEXP alt, Rboolean writeable) { return INTEGER(Materialize(alt)); } |
| 551 | |
| 552 | static SEXP Duplicate(SEXP alt, Rboolean /* deep */) { |
| 553 | // the representation integer vector |
| 554 | SEXP dup = PROTECT(Rf_shallow_duplicate(Materialize(alt))); |
| 555 | |
| 556 | // copy attributes from the altrep object |
| 557 | DUPLICATE_ATTRIB(dup, alt); |
| 558 | |
| 559 | UNPROTECT(1); |
| 560 | return dup; |
| 561 | } |
| 562 | |
| 563 | // The value at position i as an int64_t (to make bounds checking less verbose) |
| 564 | static int64_t Elt64(SEXP alt, R_xlen_t i) { |
nothing calls this directly
no test coverage detected