Skip to content

Commit af91fe9

Browse files
committed
duplicateAsResizable: refuse ALTREP objects
1 parent 40b92d1 commit af91fe9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/utils.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,7 @@ SEXP R_allocResizableVector_(SEXPTYPE type, R_xlen_t maxlen) {
668668
}
669669

670670
SEXP R_duplicateAsResizable_(SEXP x) {
671+
if (ALTREP(x)) internal_error(__func__, "Cannot duplicate an ALTREP object as resizable"); // # nocov
671672
SEXP ret = duplicate(x);
672673
SET_TRUELENGTH(ret, xlength(ret));
673674
SET_GROWABLE_BIT(ret);

0 commit comments

Comments
 (0)