[Rcpp-commits] r2387 - in pkg/Rcpp: . R inst/include/Rcpp inst/include/Rcpp/vector src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Nov 4 09:53:59 CET 2010


Author: romain
Date: 2010-11-04 09:53:59 +0100 (Thu, 04 Nov 2010)
New Revision: 2387

Modified:
   pkg/Rcpp/DESCRIPTION
   pkg/Rcpp/R/exceptions.R
   pkg/Rcpp/R/zzz.R
   pkg/Rcpp/inst/include/Rcpp/cache.h
   pkg/Rcpp/inst/include/Rcpp/config.h
   pkg/Rcpp/inst/include/Rcpp/vector/MatrixColumn.h
   pkg/Rcpp/src/Evaluator.cpp
   pkg/Rcpp/src/cache.cpp
Log:
MatrixColumn::operator= did not return *this

Modified: pkg/Rcpp/DESCRIPTION
===================================================================
--- pkg/Rcpp/DESCRIPTION	2010-11-03 23:48:27 UTC (rev 2386)
+++ pkg/Rcpp/DESCRIPTION	2010-11-04 08:53:59 UTC (rev 2387)
@@ -1,6 +1,6 @@
 Package: Rcpp
 Title: Seamless R and C++ Integration
-Version: 0.8.8
+Version: 0.8.8.1
 Date: $Date$
 Author: Dirk Eddelbuettel and Romain Francois, with contributions 
  by Douglas Bates, John Chambers, Simon Urbanek, and David Reiss; 

Modified: pkg/Rcpp/R/exceptions.R
===================================================================
--- pkg/Rcpp/R/exceptions.R	2010-11-03 23:48:27 UTC (rev 2386)
+++ pkg/Rcpp/R/exceptions.R	2010-11-04 08:53:59 UTC (rev 2387)
@@ -23,7 +23,7 @@
 	condition <- structure( 
 		list( message = message, call = call, cppstack = cppstack ), 
 		class = classes )
-	rcpp_set_current_stack_trace( NULL )
+	setStackTrace( NULL )
 	stop( condition )
 }
 

Modified: pkg/Rcpp/R/zzz.R
===================================================================
--- pkg/Rcpp/R/zzz.R	2010-11-03 23:48:27 UTC (rev 2386)
+++ pkg/Rcpp/R/zzz.R	2010-11-04 08:53:59 UTC (rev 2387)
@@ -17,8 +17,7 @@
 
 .onLoad <- function(libname, pkgname){
     install_help_workaround()
-    .Call("reset_current_error", PACKAGE = "Rcpp" )
-
+    .Call("init_Rcpp_cache", PACKAGE = "Rcpp" )
     minimum_svn_rev <- packageDescription( pkgname )[["MinimumSvnRev"]]
     if( as.integer(R.version[["svn rev"]]) < as.integer(minimum_svn_rev)){
         packageStartupMessage(gettextf(paste("R version (%s) older than minimum required (%s)",

Modified: pkg/Rcpp/inst/include/Rcpp/cache.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/cache.h	2010-11-03 23:48:27 UTC (rev 2386)
+++ pkg/Rcpp/inst/include/Rcpp/cache.h	2010-11-04 08:53:59 UTC (rev 2387)
@@ -26,8 +26,12 @@
 namespace internal{
         
     SEXP get_Rcpp_namespace() ;
+    SEXP get_rcpptrycatch() ;
+    SEXP get_evalq() ;
     
 }    
 }
 
+extern "C" SEXP rcpp_init_cached_functions(SEXP) ;
+
 #endif

Modified: pkg/Rcpp/inst/include/Rcpp/config.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/config.h	2010-11-03 23:48:27 UTC (rev 2386)
+++ pkg/Rcpp/inst/include/Rcpp/config.h	2010-11-04 08:53:59 UTC (rev 2387)
@@ -30,7 +30,7 @@
 #endif
 
 #define Rcpp_Version(v,p,s) (((v) * 65536) + ((p) * 256) + (s))
-#define RCPP_VERSION Rcpp_Version(0,8,6)
+#define RCPP_VERSION Rcpp_Version(0,8,9)
 
 #endif
 

Modified: pkg/Rcpp/inst/include/Rcpp/vector/MatrixColumn.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/vector/MatrixColumn.h	2010-11-03 23:48:27 UTC (rev 2386)
+++ pkg/Rcpp/inst/include/Rcpp/vector/MatrixColumn.h	2010-11-04 08:53:59 UTC (rev 2387)
@@ -63,6 +63,7 @@
               default:                                   
                   {}                         
             }
+       return *this ;
 	}
 
 	Proxy operator[]( int i ){

Modified: pkg/Rcpp/src/Evaluator.cpp
===================================================================
--- pkg/Rcpp/src/Evaluator.cpp	2010-11-03 23:48:27 UTC (rev 2386)
+++ pkg/Rcpp/src/Evaluator.cpp	2010-11-04 08:53:59 UTC (rev 2387)
@@ -24,14 +24,13 @@
 namespace Rcpp {
 
    SEXP Evaluator::run(SEXP expr, SEXP env) throw(eval_error) {
-	SEXP call = PROTECT( 
+       SEXP call = PROTECT( 
 		Rf_lang2( 
-			Rf_install("rcpp_tryCatch") , 
-			Rf_lang3( Rf_install( "evalq") , expr, env )
+		    internal::get_rcpptrycatch() , 
+			Rf_lang3( internal::get_evalq() , expr, env )
 			)
 		) ;
-	
-   	Environment RCPP = Environment::Rcpp_namespace(); 
+	Environment RCPP = Environment::Rcpp_namespace(); 
    	
 	/* call the tryCatch call */
 	SEXP res = PROTECT( Rf_eval( call, RCPP ) );

Modified: pkg/Rcpp/src/cache.cpp
===================================================================
--- pkg/Rcpp/src/cache.cpp	2010-11-03 23:48:27 UTC (rev 2386)
+++ pkg/Rcpp/src/cache.cpp	2010-11-04 08:53:59 UTC (rev 2387)
@@ -32,8 +32,15 @@
     namespace internal{   
     SEXP get_Rcpp_namespace(){ 
         maybe_init() ; return VECTOR_ELT( Rcpp_cache , 0 ) ;
-    }                         
-    
+    }
+    SEXP get_rcpptrycatch(){
+       // maybe_init() ; return VECTOR_ELT( Rcpp_cache, 4 ) ; 
+       return Rf_install("rcpp_tryCatch") ;
+    }                              
+    SEXP get_evalq(){
+        // maybe_init() ; return VECTOR_ELT( Rcpp_cache, 5 ) ;
+        return Rf_install("evalq");
+    }
 }
 }
 
@@ -48,6 +55,8 @@
     SEXP RCPP = PROTECT( Rf_eval( Rf_lcons( Rf_install("getNamespace"), Rf_cons( Rf_mkString("Rcpp") , R_NilValue) ), R_GlobalEnv ) ) ;
     SET_VECTOR_ELT( Rcpp_cache, 0, RCPP ) ;
 	reset_current_error() ;
+	// SET_VECTOR_ELT( Rcpp_cache, 4, Rf_install("rcpp_tryCatch") ) ;
+	// SET_VECTOR_ELT( Rcpp_cache, 5, Rf_install("evalq") ) ;
 	
     R_PreserveObject( Rcpp_cache ) ;
 	UNPROTECT(2) ;  



More information about the Rcpp-commits mailing list