Skip to content

Commit 24ccfd8

Browse files
authored
Merge pull request #402 from SebKrantz/development
Development
2 parents fd95a91 + 247ad9a commit 24ccfd8

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: collapse
22
Title: Advanced and Fast Data Transformation
33
Version: 1.9.5
4-
Date: 2023-03-30
4+
Date: 2023-04-03
55
Authors@R: c(
66
person("Sebastian", "Krantz", role = c("aut", "cre"),
77
email = "[email protected]"),

src/programming.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,8 +404,7 @@ SEXP setcopyv(SEXP x, SEXP val, SEXP rep, SEXP Rinvert, SEXP Rset, SEXP Rind1) {
404404
}
405405
case VECSXP:
406406
{
407-
if(set && ALTREP(x)) error("cannot modify ALTREP list by reference");
408-
SEXP *restrict px = set ? SEXPPTR(x) : SEXPPTR(ans);
407+
SEXP *restrict px = (set == 0) ? SEXPPTR(ans) : ALTREP(x) ? (SEXP *)ALTVEC_DATAPTR(x) : SEXPPTR(x);
409408
if(lv == 1 && ind1 == 0) error("Cannot compare lists to a value");
410409
// if(tr != VECSXP) error("If X is a list and xlist = TRUE, R also needs to be a list");
411410
const int *restrict pv = INTEGER(val); // ALTREP(val) ? (const int *)ALTVEC_DATAPTR(val) :

0 commit comments

Comments
 (0)