@@ -57,20 +57,10 @@ const char* char_nocheck__impl( SEXP x ){ return CHAR(x); }
5757
5858static bool Rcpp_cache_know = false ;
5959static SEXP Rcpp_cache = R_NilValue ;
60- static SEXP Rcpp_protection_stack = R_NilValue ;
6160
6261#define RCPP_HASH_CACHE_INDEX 4
63- #define RCPP_PROTECTION_STACK_INDEX 5
6462#define RCPP_CACHE_SIZE 6
6563
66- #ifndef RCPP_PROTECT_STACK_INITIAL_SIZE
67- #define RCPP_PROTECT_STACK_INITIAL_SIZE 16384
68- #endif
69-
70- #ifndef RCPP_PROTECT_STACK_INCREMENT
71- #define RCPP_PROTECT_STACK_INCREMENT 4096
72- #endif
73-
7464#ifndef RCPP_HASH_CACHE_INITIAL_SIZE
7565#define RCPP_HASH_CACHE_INITIAL_SIZE 1024
7666#endif
@@ -83,7 +73,6 @@ SEXP get_rcpp_cache() {
8373 SEXP RCPP = PROTECT ( Rf_eval (Rf_lang2 ( getNamespaceSym, Rf_mkString (" Rcpp11" ) ), R_GlobalEnv) );
8474 Rcpp_cache = Rf_findVarInFrame ( RCPP, Rf_install (" .rcpp_cache" ) ) ;
8575 Rcpp_cache_know = true ;
86- Rcpp_protection_stack = VECTOR_ELT (Rcpp_cache, RCPP_PROTECTION_STACK_INDEX) ;
8776 UNPROTECT (1 ) ;
8877 }
8978 RCPP_DEBUG ( " [get_rcpp_cache] Rcpp_cache = <%p>" , Rcpp_cache )
@@ -131,10 +120,6 @@ SEXP init_Rcpp11_cache(){
131120 set_current_error ( cache, R_NilValue ) ;
132121 RCPP_SET_VECTOR_ELT ( cache, 3 , R_NilValue ) ; // stack trace
133122 RCPP_SET_VECTOR_ELT ( cache, RCPP_HASH_CACHE_INDEX, Rf_allocVector (INTSXP, RCPP_HASH_CACHE_INITIAL_SIZE) ) ;
134- SEXP stack = PROTECT ( Rf_allocVector (VECSXP, RCPP_PROTECT_STACK_INITIAL_SIZE) ) ;
135- // we use true length to store "top"
136- SET_TRUELENGTH (stack, -1 ) ;
137- RCPP_SET_VECTOR_ELT ( cache, RCPP_PROTECTION_STACK_INDEX, stack ) ;
138123 Rf_defineVar ( Rf_install (" .rcpp_cache" ), cache, RCPP );
139124
140125 UNPROTECT (3 ) ;
0 commit comments