File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1+ 2014-08-30 Kevin Ushey <
[email protected] >
2+
3+ * inst/include/Rcpp/Environment.h: Add 'new_env' function
4+
152014-08-30 Dirk Eddelbuettel <
[email protected] >
26
37 * inst/include/Rcpp/vector/Vector.h: Mark two 'from string' ctors as
Original file line number Diff line number Diff line change 2222#ifndef Rcpp_Environment_h
2323#define Rcpp_Environment_h
2424
25+ // From R/Defn.h
26+ extern " C" SEXP R_NewHashedEnv (SEXP, SEXP);
27+
2528namespace Rcpp {
2629
2730 RCPP_API_CLASS (Environment_Impl),
@@ -311,6 +314,11 @@ namespace Rcpp{
311314 return Rcpp::internal::get_Rcpp_namespace () ;
312315 }
313316
317+ static Environment_Impl new_env (int size = 29 ) {
318+ Shield<SEXP> sizeSEXP (Rf_ScalarInteger (size));
319+ return R_NewHashedEnv (R_EmptyEnv, sizeSEXP);
320+ };
321+
314322 /* *
315323 * @param name the name of the package of which we want the namespace
316324 *
@@ -349,7 +357,7 @@ namespace Rcpp{
349357 void update (SEXP){}
350358 };
351359
352- typedef Environment_Impl<PreserveStorage> Environment ;
360+ typedef Environment_Impl<PreserveStorage> Environment ;
353361
354362
355363} // namespace Rcpp
You can’t perform that action at this time.
0 commit comments