[Rcpp-commits] r3646 - in pkg/Rcpp: . inst/include/Rcpp src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jun 27 17:06:05 CEST 2012


Author: edd
Date: 2012-06-27 17:06:04 +0200 (Wed, 27 Jun 2012)
New Revision: 3646

Modified:
   pkg/Rcpp/ChangeLog
   pkg/Rcpp/DESCRIPTION
   pkg/Rcpp/inst/include/Rcpp/Environment.h
   pkg/Rcpp/src/Environment.cpp
Log:
now for the real brown bag fix needed for RInside use of Rcpp


Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog	2012-06-26 19:16:34 UTC (rev 3645)
+++ pkg/Rcpp/ChangeLog	2012-06-27 15:06:04 UTC (rev 3646)
@@ -1,3 +1,9 @@
+2012-06-27  Dirk Eddelbuettel  <edd at debian.org>
+
+	* src/Environment.cpp: Default ctor initializes its RObject with
+	R_GlobalEnv; SEXP constructor does not use a default arg as it tests
+	* inst/include/Rcpp/Environment.h: Corresponding change
+
 2012-06-23  Dirk Eddelbuettel  <edd at debian.org>
 
 	* src/Environment.cpp: Remove empty constructor which is redundant
@@ -2,21 +8,21 @@
 	since fix in rev3592 with default SEXP value of R_GlobalEnv
-	* inst/include/Rcpp/Environment.h: Idem 
+	* inst/include/Rcpp/Environment.h: Idem
 
 	* inst/unitTests/runTests.R (allTests): Command-line flag --allTests
 	sets an environment variable indicating that all tests should run
 
-	* inst/unitTests/runit.Module.R: Run only if RunAllCppTests var set 
-	* inst/unitTests/runit.Module.client.package.R: Idem 
+	* inst/unitTests/runit.Module.R: Run only if RunAllCppTests var set
+	* inst/unitTests/runit.Module.client.package.R: Idem
 	* inst/unitTests/runit.client.package.R: Idem
 	* inst/unitTests/runit.XPtr.R: Idem
 	* inst/unitTests/runit.macros.R: Idem
 
-	* inst/doc/unitTests/Rcpp-unitTests.R: Ensure Rcpp-unitTests 
+	* inst/doc/unitTests/Rcpp-unitTests.R: Ensure Rcpp-unitTests
 	vignette is built with RunAllCppTests flag set
-	
+
 	* cleanup: Also clean in inst/unitTests/testRcppClass/src
 
 	* DESCRIPTION: Set Maintainer: to edd at debian.org as CRAN prefers to
 	receive upload email from the same address the Maintainer field
-	
+
 2012-06-22  Dirk Eddelbuettel  <edd at debian.org>

Modified: pkg/Rcpp/DESCRIPTION
===================================================================
--- pkg/Rcpp/DESCRIPTION	2012-06-26 19:16:34 UTC (rev 3645)
+++ pkg/Rcpp/DESCRIPTION	2012-06-27 15:06:04 UTC (rev 3646)
@@ -1,6 +1,6 @@
 Package: Rcpp
 Title: Seamless R and C++ Integration
-Version: 0.9.12
+Version: 0.9.12.1
 Date: $Date$
 Author: Dirk Eddelbuettel and Romain Francois, with contributions 
  by Douglas Bates and John Chambers

Modified: pkg/Rcpp/inst/include/Rcpp/Environment.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/Environment.h	2012-06-26 19:16:34 UTC (rev 3645)
+++ pkg/Rcpp/inst/include/Rcpp/Environment.h	2012-06-27 15:06:04 UTC (rev 3646)
@@ -167,12 +167,14 @@
     
         friend class Binding ;
     
+        Environment() ;
+
         /**
          * wraps the given environment
          *
          * if the SEXP is not an environment, and exception is thrown
          */
-        Environment(SEXP x = R_GlobalEnv);
+        Environment(SEXP x);
     
         /**
          * copy constructor

Modified: pkg/Rcpp/src/Environment.cpp
===================================================================
--- pkg/Rcpp/src/Environment.cpp	2012-06-26 19:16:34 UTC (rev 3645)
+++ pkg/Rcpp/src/Environment.cpp	2012-06-27 15:06:04 UTC (rev 3646)
@@ -23,6 +23,8 @@
 
 namespace Rcpp {
 
+    Environment::Environment() : RObject(R_GlobalEnv){}
+
     Environment::Environment(SEXP x) : RObject(x){
         if( ! Rf_isEnvironment(x) ) {
             /* not an environment, but maybe convertible to one using as.environment, try that */



More information about the Rcpp-commits mailing list