We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fa6ca0 commit 72f4db1Copy full SHA for 72f4db1
inst/include/Rcpp/protection/Shield.h
@@ -26,6 +26,8 @@ namespace Rcpp{
26
}
27
28
inline void Rcpp_unprotect(int i){
29
+ // Prefer this function over UNPROTECT() in Rcpp so that all
30
+ // balance checks errors by rchk are contained at one location (#892)
31
UNPROTECT(i);
32
33
inst/include/Rcpp/vector/no_init.h
@@ -37,6 +37,8 @@ class no_init_vector {
37
38
template <int RTYPE>
39
operator Vector<RTYPE, PreserveStorage>() const {
40
+ // Explicitly protect temporary vector to avoid false positive
41
+ // with rchk (#892)
42
SEXP x = PROTECT(Rf_allocVector(RTYPE, size));
43
Vector<RTYPE, PreserveStorage> ret(x);
44
UNPROTECT(1);
0 commit comments