[Rcpp-commits] r2627 - in pkg/RcppGSL: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Nov 30 19:50:58 CET 2010


Author: romain
Date: 2010-11-30 19:50:58 +0100 (Tue, 30 Nov 2010)
New Revision: 2627

Modified:
   pkg/RcppGSL/NAMESPACE
   pkg/RcppGSL/R/inline.R
Log:
using assignInNamespace

Modified: pkg/RcppGSL/NAMESPACE
===================================================================
--- pkg/RcppGSL/NAMESPACE	2010-11-30 18:45:11 UTC (rev 2626)
+++ pkg/RcppGSL/NAMESPACE	2010-11-30 18:50:58 UTC (rev 2627)
@@ -1,5 +1,6 @@
 useDynLib(RcppGSL)
 
+importFrom(utils,assignInNamespace)
 export(fastLmPure,
        fastLm,
        fastLm.default,

Modified: pkg/RcppGSL/R/inline.R
===================================================================
--- pkg/RcppGSL/R/inline.R	2010-11-30 18:45:11 UTC (rev 2626)
+++ pkg/RcppGSL/R/inline.R	2010-11-30 18:50:58 UTC (rev 2627)
@@ -32,19 +32,10 @@
     gsl_cflags <- system( "gsl-config --cflags" , intern = TRUE )
     gsl_libs   <- system( "gsl-config --libs"   , intern = TRUE )
     
-    unlockBinding( "gsl_cflags", NAMESPACE )
-    unlockBinding( "gsl_libs", NAMESPACE )
-    unlockBinding( "know_flags", NAMESPACE )
-    
-    assign( "gsl_cflags", gsl_cflags, NAMESPACE )
-    assign( "gsl_libs", gsl_libs, NAMESPACE )
-    assign( "know_flags", TRUE, NAMESPACE )
-    
-    lockBinding( "gsl_cflags", NAMESPACE )
-    lockBinding( "gsl_libs", NAMESPACE )
-    lockBinding( "know_flags", NAMESPACE )
+    assignInNamespace( "gsl_cflags", gsl_cflags, NAMESPACE )
+    assignInNamespace( "gsl_libs", gsl_libs, NAMESPACE )
+    assignInNamespace( "know_flags", TRUE, NAMESPACE )
 }
-       
 
 LdFlags <- function( print = TRUE ){
     if( ! know_flags ) {



More information about the Rcpp-commits mailing list