[Rcpp-commits] r3714 - in pkg/RcppGSL: . R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jul 23 04:54:57 CEST 2012
Author: edd
Date: 2012-07-23 04:54:56 +0200 (Mon, 23 Jul 2012)
New Revision: 3714
Modified:
pkg/RcppGSL/ChangeLog
pkg/RcppGSL/R/inline.R
pkg/RcppGSL/inst/NEWS.Rd
Log:
o another small update to inline support: use a package-global environment
to store the two configuration variables
Modified: pkg/RcppGSL/ChangeLog
===================================================================
--- pkg/RcppGSL/ChangeLog 2012-07-22 22:19:16 UTC (rev 3713)
+++ pkg/RcppGSL/ChangeLog 2012-07-23 02:54:56 UTC (rev 3714)
@@ -4,8 +4,8 @@
* inst/unitTests/runit.fastLm.R: expanded unit tests
- * R/inline.R: Use two hidden global variables to store RcppGSL
- compiler and linker flags instead of using assignInNamespace
+ * R/inline.R: Use two variables in a new package-global environment
+ to store RcppGSL compiler and linker flags
* vignettes/RcppGSL/RcppGSL-intro.Rnw: Skip use of highlight for
C++ and shell snippets to sidestep build issues on 32bit OSs
Modified: pkg/RcppGSL/R/inline.R
===================================================================
--- pkg/RcppGSL/R/inline.R 2012-07-22 22:19:16 UTC (rev 3713)
+++ pkg/RcppGSL/R/inline.R 2012-07-23 02:54:56 UTC (rev 3714)
@@ -15,6 +15,8 @@
## You should have received a copy of the GNU General Public License
## along with RcppArmadillo. If not, see <http://www.gnu.org/licenses/>.
+.pkgglobalenv <- new.env(parent=emptyenv())
+
.onLoad <- function(libname, pkgname) {
if (.Platform$OS.type=="windows") {
@@ -26,15 +28,16 @@
gsl_libs <- system( "gsl-config --libs" , intern = TRUE )
}
- assign( ".rcppgsl_cflags", gsl_cflags, envir=.GlobalEnv )
- assign( ".rcppgsl_libs", gsl_libs, envir=.GlobalEnv )
+ assign("gsl_cflags", gsl_cflags, envir=.pkgglobalenv)
+ assign("gsl_libs", gsl_libs, envir=.pkgglobalenv)
}
LdFlags <- function(print = TRUE) {
- if (print) cat(.rcppgsl_libs) else .rcppgsl_libs }
+ if (print) cat(.pkgglobalenv$gsl_libs) else .pkgglobalenv$gsl_libs
+}
CFlags <- function(print = TRUE) {
- if (print) cat(.rcppgsl_cflags) else .rcppgsl_cflags
+ if (print) cat(.pkgglobalenv$gsl_cflags) else .pkgglobalenv$gsl_cflags
}
inlineCxxPlugin <- function(...) {
Modified: pkg/RcppGSL/inst/NEWS.Rd
===================================================================
--- pkg/RcppGSL/inst/NEWS.Rd 2012-07-22 22:19:16 UTC (rev 3713)
+++ pkg/RcppGSL/inst/NEWS.Rd 2012-07-23 02:54:56 UTC (rev 3714)
@@ -4,7 +4,7 @@
\section{Changes in version 0.2.0 (2012-07-22)}{
\itemize{
- \item{summary() for fastLm() now displays vastly more information}
+ \item{summary() for fastLm() now displays more information}
\item{fastLmPure() now uses same argument order as R's lm.fit()}
\item{Added more unit tests for fastLm() and related functions}
\item{Export and document S3 methods in NAMESPACE and manual page as
@@ -13,7 +13,8 @@
\item{Main vignette renamed to \code{RcppGSL-intro.pdf} to use a
filename different from the package reference manual}
\item{NEWS file converted to .Rd format}
- \item{inline support function no longer uses assignInNamespace}
+ \item{inline plugin support function no longer uses
+ assignInNamespace but deploys a small package-global enviornment}
}
}
\section{Changes in version 0.1.1 (2011-04-05)}{
More information about the Rcpp-commits
mailing list