[Rcpp-commits] r4162 - pkg/Rcpp/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Dec 17 09:25:48 CET 2012


Author: romain
Date: 2012-12-17 09:25:47 +0100 (Mon, 17 Dec 2012)
New Revision: 4162

Modified:
   pkg/Rcpp/src/barrier.cpp
Log:
use get_rpp_cache() in get_Rcpp_namespace

Modified: pkg/Rcpp/src/barrier.cpp
===================================================================
--- pkg/Rcpp/src/barrier.cpp	2012-12-15 22:41:37 UTC (rev 4161)
+++ pkg/Rcpp/src/barrier.cpp	2012-12-17 08:25:47 UTC (rev 4162)
@@ -62,14 +62,6 @@
 #define RCPP_HASH_CACHE_INITIAL_SIZE 1024
 #endif 
 
-namespace Rcpp {
-    namespace internal {   
-		SEXP get_Rcpp_namespace(){ 
-			return VECTOR_ELT( Rcpp_cache , 0 ) ;
-		}
-	}
-}
-
 // only used for debugging
 SEXP get_rcpp_cache() {
     if( ! Rcpp_cache_know ){
@@ -84,6 +76,14 @@
     return Rcpp_cache ;
 }
 
+namespace Rcpp {
+    namespace internal {   
+		SEXP get_Rcpp_namespace(){ 
+			return VECTOR_ELT( get_rcpp_cache() , 0 ) ;
+		}
+	}
+}
+
 SEXP set_error_occured(SEXP cache, SEXP e){
     SET_VECTOR_ELT( cache, 1, e ) ;
     return R_NilValue ;



More information about the Rcpp-commits mailing list