[Rcpp-commits] r2143 - pkg/Rcpp/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Sep 22 13:09:28 CEST 2010
Author: romain
Date: 2010-09-22 13:09:28 +0200 (Wed, 22 Sep 2010)
New Revision: 2143
Modified:
pkg/Rcpp/R/02_completion.R
Log:
restore broken completion for modules
Modified: pkg/Rcpp/R/02_completion.R
===================================================================
--- pkg/Rcpp/R/02_completion.R 2010-09-22 11:01:50 UTC (rev 2142)
+++ pkg/Rcpp/R/02_completion.R 2010-09-22 11:09:28 UTC (rev 2143)
@@ -16,8 +16,12 @@
# along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
setGeneric( ".DollarNames" )
-.DollarNames.Module <- function(x, pattern){
- grep( pattern , .Call( "Module__complete", x at pointer, PACKAGE = "Rcpp"), value = TRUE )
+.DollarNames.Module <- function(x, pattern){
+ pointer <- .getModulePointer( x )
+ if(identical(pointer, .badModulePointer)) {
+ stop( "unitialized module" )
+ }
+ grep( pattern , .Call( "Module__complete", pointer, PACKAGE = "Rcpp"), value = TRUE )
}
setMethod( ".DollarNames", "Module", .DollarNames.Module )
More information about the Rcpp-commits
mailing list