27#include <Rinternals.h>
37 return STRING_ELT(x, i);
42 return CHAR(STRING_ELT(x, i));
47 SET_STRING_ELT(x, i, value);
52 SET_STRING_ELT(x, i, Rf_mkChar(value));
63 return VECTOR_ELT(x, i);
68 SET_VECTOR_ELT(x, i, value);
90#define RCPP_HASH_CACHE_INDEX 4
91#define RCPP_CACHE_SIZE 5
93#ifndef RCPP_HASH_CACHE_INITIAL_SIZE
94#define RCPP_HASH_CACHE_INITIAL_SIZE 1024
142 SEXP getNamespaceSym = Rf_install(
"getNamespace");
147 Rcpp_cache = Rf_findVarInFrame(RCPP, Rf_install(
".rcpp_cache"));
174 SET_VECTOR_ELT(cache, 1, e);
179 SET_VECTOR_ELT(cache, 2, e);
184 SEXP getNamespaceSym = Rf_install(
"getNamespace");
191 SET_VECTOR_ELT(cache, 0, RCPP);
194 SET_VECTOR_ELT(cache, 3, R_NilValue);
197 Rf_defineVar(Rf_install(
".rcpp_cache"), cache, RCPP);
213 SET_VECTOR_ELT(cache, 3, R_NilValue);
221 return LOGICAL(err)[0];
246 int n = Rf_length(hash_cache);
249 hash_cache = new_hash_cache;
252 int *res = INTEGER(hash_cache);
253 std::fill(res, res+m, 0);
void char_set_string_elt(SEXP x, R_xlen_t i, const char *value)
#define RCPP_HASH_CACHE_INDEX
SEXP set_current_error(SEXP cache, SEXP e)
SEXP get_vector_elt(SEXP x, R_xlen_t i)
#define RCPP_HASH_CACHE_INITIAL_SIZE
SEXP reset_current_error()
SEXP rcpp_error_recorder(SEXP e)
static bool Rcpp_cache_know
SEXP get_string_elt(SEXP x, R_xlen_t i)
const char * char_get_string_elt(SEXP x, R_xlen_t i)
void set_vector_elt(SEXP x, R_xlen_t i, SEXP value)
const char * char_nocheck(SEXP x)
SEXP * get_vector_ptr(SEXP x)
SEXP * get_string_ptr(SEXP x)
SEXP rcpp_get_current_error()
SEXP set_error_occured(SEXP cache, SEXP e)
SEXP rcpp_get_stack_trace()
SEXP rcpp_set_stack_trace(SEXP e)
void set_string_elt(SEXP x, R_xlen_t i, SEXP value)
T as(SEXP x, ::Rcpp::traits::r_type_primitive_tag)
attribute_hidden SEXP get_Rcpp_namespace()
attribute_hidden void Rcpp_precious_init()
attribute_hidden SEXP Rcpp_precious_preserve(SEXP object)
attribute_hidden void Rcpp_precious_remove(SEXP token)
attribute_hidden void Rcpp_precious_teardown()
static SEXP Rcpp_precious