MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / Rcpp_precious_preserve

Function Rcpp_precious_preserve

src/barrier.cpp:110–123  ·  view source on GitHub ↗

#nocov end [[Rcpp::register]]

Source from the content-addressed store, hash-verified

108} // #nocov end
109// [[Rcpp::register]]
110SEXP Rcpp_precious_preserve(SEXP object) {
111 if (object == R_NilValue) {
112 return R_NilValue; // #nocov
113 }
114 PROTECT(object);
115 SEXP cell = PROTECT(CONS(Rcpp_precious, CDR(Rcpp_precious)));
116 SET_TAG(cell, object);
117 SETCDR(Rcpp_precious, cell);
118 if (CDR(cell) != R_NilValue) {
119 SETCAR(CDR(cell), cell);
120 }
121 UNPROTECT(2);
122 return cell;
123}
124// [[Rcpp::register]]
125void Rcpp_precious_remove(SEXP token) {
126 if (token == R_NilValue || TYPEOF(token) != LISTSXP) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected