Skip to content

Commit 7ec783f

Browse files
committed
untag token upon removal from the precious list
1 parent 136ec60 commit 7ec783f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/barrier.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// barrier.cpp: Rcpp R/C++ interface class library -- write barrier
33
//
44
// Copyright (C) 2010 - 2020 Dirk Eddelbuettel and Romain Francois
5-
// Copyright (C) 2021 Dirk Eddelbuettel, Romain Francois and Iñaki Ucar
5+
// Copyright (C) 2021 - 2022 Dirk Eddelbuettel, Romain Francois and Iñaki Ucar
66
//
77
// This file is part of Rcpp.
88
//
@@ -119,6 +119,7 @@ void Rcpp_precious_remove(SEXP token) {
119119
if (token == R_NilValue || TYPEOF(token) != LISTSXP) {
120120
return;
121121
}
122+
SET_TAG(token, R_NilValue);
122123
SEXP before = CAR(token);
123124
SEXP after = CDR(token);
124125
SETCDR(before, after);

0 commit comments

Comments
 (0)