[Rcpp-commits] r1289 - in pkg/Rcpp: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu May 20 14:27:58 CEST 2010
Author: romain
Date: 2010-05-20 14:27:57 +0200 (Thu, 20 May 2010)
New Revision: 1289
Removed:
pkg/Rcpp/R/getDLL.R
Modified:
pkg/Rcpp/NAMESPACE
Log:
promote getDLL to the inline package
Modified: pkg/Rcpp/NAMESPACE
===================================================================
--- pkg/Rcpp/NAMESPACE 2010-05-20 08:43:56 UTC (rev 1288)
+++ pkg/Rcpp/NAMESPACE 2010-05-20 12:27:57 UTC (rev 1289)
@@ -6,7 +6,6 @@
importFrom( utils, capture.output )
importFrom( inline, cfunction )
-exportMethods( getDLL )
exportClasses( Module )
export( Module )
Deleted: pkg/Rcpp/R/getDLL.R
===================================================================
--- pkg/Rcpp/R/getDLL.R 2010-05-20 08:43:56 UTC (rev 1288)
+++ pkg/Rcpp/R/getDLL.R 2010-05-20 12:27:57 UTC (rev 1289)
@@ -1,44 +0,0 @@
-# Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois
-#
-# This file is part of Rcpp.
-#
-# Rcpp is free software: you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# Rcpp is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
-
-# TODO: this probably should be in inline rather than in Rcpp
-
-setGeneric("getDLL", function(x, ...) standardGeneric("getDLL") )
-
-setMethod( "getDLL", signature( x = "character" ),
-function( x ){
- dlls <- getLoadedDLLs()
- if( x %in% names( dlls ) ){
- dlls[[ x ]]
- } else {
- stop( sprintf( "dll %s not loaded" ) )
- }
-} )
-
-setMethod( "getDLL", signature( x = "CFunc" ),
-function( x ){
- env <- environment( x at .Data )
- f <- get( "f", env )
- dlls <- getLoadedDLLs()
- dll <- if( ! f %in% names(dlls) ){
- dyn.load( get( "libLFile", env ) )
- } else{
- dlls[[ f ]]
- }
- dll
-} )
-
More information about the Rcpp-commits
mailing list