File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 1+ 2014-09-03 Kevin Ushey <
[email protected] >
2+
3+ * inst/include/Rcpp/Environment.h: make new_env a free function
4+
152014-08-30 Kevin Ushey <
[email protected] >
26
37 * inst/include/Rcpp/Environment.h: Add 'new_env' function
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
25+ // From 'R/Defn.h'
26+ // NOTE: can't include header directly as it checks for some C99 features
2627extern " C" SEXP R_NewHashedEnv (SEXP, SEXP);
2728
2829namespace Rcpp {
@@ -314,11 +315,6 @@ namespace Rcpp{
314315 return Rcpp::internal::get_Rcpp_namespace () ;
315316 }
316317
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-
322318 /* *
323319 * @param name the name of the package of which we want the namespace
324320 *
@@ -359,6 +355,11 @@ namespace Rcpp{
359355
360356typedef Environment_Impl<PreserveStorage> Environment ;
361357
358+ inline Environment new_env (int size = 29 ) {
359+ Shield<SEXP> sizeSEXP (Rf_ScalarInteger (size));
360+ return R_NewHashedEnv (R_EmptyEnv, sizeSEXP);
361+ };
362+
362363
363364} // namespace Rcpp
364365
You can’t perform that action at this time.
0 commit comments