File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1+ 2014-09-03 Kevin Ushey <kevinushey@gmail.com>
2+
3+ * inst/include/Rcpp/Environment.h: make new_env a free function
4+
152014-09-02 Kevin Ushey <kevinushey@gmail.com>
26
37 * inst/include/Rcpp/api/meat/proxy.h: Finish meat reintroduction + tests
2024 * inst/include/Rcpp/vector/ListOf.h: `size()` member function should
2125 return `R_len_t` rather than `int`
2226
27+ 2014-08-30 Kevin Ushey <kevinushey@gmail.com>
28+
29+ * inst/include/Rcpp/Environment.h: Add 'new_env' function
30+
23312014-08-30 Dirk Eddelbuettel <edd@debian.org>
2432
2533 * 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+ // NOTE: can't include header directly as it checks for some C99 features
27+ extern " C" SEXP R_NewHashedEnv (SEXP, SEXP);
28+
2529namespace Rcpp {
2630
2731 RCPP_API_CLASS (Environment_Impl),
@@ -349,7 +353,12 @@ namespace Rcpp{
349353 void update (SEXP){}
350354 };
351355
352- typedef Environment_Impl<PreserveStorage> Environment ;
356+ typedef Environment_Impl<PreserveStorage> Environment ;
357+
358+ inline Environment new_env (int size = 29 ) {
359+ Shield<SEXP> sizeSEXP (Rf_ScalarInteger (size));
360+ return R_NewHashedEnv (R_EmptyEnv, sizeSEXP);
361+ };
353362
354363
355364} // namespace Rcpp
You can’t perform that action at this time.
0 commit comments