File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change
1
+ 2015-02-19 Lionel Henry <
[email protected] >
2
+
3
+ * inst/include/Rcpp/Environment.h Allow new_env() to create an
4
+ environment with a specified parent
5
+
1
6
2015-02-19 JJ Allaire <
[email protected] >
2
7
3
8
* vignettes/Rcpp-attributes.Rnw: Add note on using inline
13
18
* src/attributes.cpp: Allow includes of local files
14
19
(e.g. #include "foo.hpp") in sourceCpp
15
20
* Rcpp.Rproj: Specify Sweave as Rnw handler for RStudio
16
- * vignettes/*.Rnw: Add driver magic comment and turn off
21
+ * vignettes/*.Rnw: Add driver magic comment and turn off
17
22
Sweave concordance.
18
23
* vignettes/.gitignore: Ignore artifacts of PDF preview
19
24
Original file line number Diff line number Diff line change @@ -361,6 +361,15 @@ inline Environment new_env(int size = 29) {
361
361
return R_NewHashedEnv (R_EmptyEnv, sizeSEXP);
362
362
}
363
363
364
+ inline Environment new_env (SEXP parent, int size = 29 ) {
365
+ Shield<SEXP> sizeSEXP (Rf_ScalarInteger (size));
366
+ Shield<SEXP> parentSEXP (parent);
367
+ if (!Rf_isEnvironment (parentSEXP)) {
368
+ stop (" parent is not an environment" );
369
+ }
370
+ return R_NewHashedEnv (parentSEXP, sizeSEXP);
371
+ }
372
+
364
373
365
374
} // namespace Rcpp
366
375
You can’t perform that action at this time.
0 commit comments