77#include " cpp11/R.hpp" // for SEXP, SEXPREC, Rf_all...
88#include " cpp11/attribute_proxy.hpp" // for attribute_proxy
99#include " cpp11/named_arg.hpp" // for named_arg
10- #include " cpp11/protect.hpp" // for preserved
10+ #include " cpp11/protect.hpp" // for store
1111#include " cpp11/r_bool.hpp" // for r_bool
1212#include " cpp11/r_vector.hpp" // for r_vector, r_vector<>::proxy
1313#include " cpp11/sexp.hpp" // for sexp
@@ -80,7 +80,7 @@ inline bool operator==(const r_vector<r_bool>::proxy& lhs, r_bool rhs) {
8080template <>
8181inline r_vector<r_bool>::r_vector(std::initializer_list<r_bool> il)
8282 : cpp11::r_vector<r_bool>(Rf_allocVector(LGLSXP, il.size())), capacity_(il.size()) {
83- protect_ = preserved. insert (data_);
83+ protect_ = detail::store:: insert (data_);
8484 auto it = il.begin ();
8585 for (R_xlen_t i = 0 ; i < capacity_; ++i, ++it) {
8686 SET_LOGICAL_ELT (data_, i, *it);
@@ -91,7 +91,7 @@ template <>
9191inline r_vector<r_bool>::r_vector(std::initializer_list<named_arg> il)
9292 : cpp11::r_vector<r_bool>(safe[Rf_allocVector](LGLSXP, il.size())),
9393 capacity_ (il.size()) {
94- protect_ = preserved. insert (data_);
94+ protect_ = detail::store:: insert (data_);
9595 int n_protected = 0 ;
9696
9797 try {
@@ -107,7 +107,7 @@ inline r_vector<r_bool>::r_vector(std::initializer_list<named_arg> il)
107107 UNPROTECT (n_protected);
108108 });
109109 } catch (const unwind_exception& e) {
110- preserved. release (protect_);
110+ detail::store:: release (protect_);
111111 UNPROTECT (n_protected);
112112 throw e;
113113 }
@@ -118,9 +118,9 @@ inline void r_vector<r_bool>::reserve(R_xlen_t new_capacity) {
118118 data_ = data_ == R_NilValue ? safe[Rf_allocVector](LGLSXP, new_capacity)
119119 : safe[Rf_xlengthgets](data_, new_capacity);
120120 SEXP old_protect = protect_;
121- protect_ = preserved. insert (data_);
121+ protect_ = detail::store:: insert (data_);
122122
123- preserved. release (old_protect);
123+ detail::store:: release (old_protect);
124124
125125 data_p_ = LOGICAL (data_);
126126 capacity_ = new_capacity;
0 commit comments