[Rcpp-commits] r2411 - pkg/Rcpp/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Nov 6 22:56:08 CET 2010
Author: jmc
Date: 2010-11-06 22:56:06 +0100 (Sat, 06 Nov 2010)
New Revision: 2411
Modified:
pkg/Rcpp/R/03_prompt.R
Log:
prompt method for modules needs pointer if name is missing (not slot)
Modified: pkg/Rcpp/R/03_prompt.R
===================================================================
--- pkg/Rcpp/R/03_prompt.R 2010-11-06 21:25:24 UTC (rev 2410)
+++ pkg/Rcpp/R/03_prompt.R 2010-11-06 21:56:06 UTC (rev 2411)
@@ -28,7 +28,9 @@
setGeneric( "prompt" )
setMethod( "prompt", "Module", function(object, filename = NULL, name = NULL, ...){
lines <- readLines( system.file( "prompt", "module.Rd", package = "Rcpp" ) )
- if( is.null(name) ) name <- .Call( Module__name, object at pointer )
+ pointer <- .getModulePointer(object)
+ if( is.null(name) )
+ name <- .Call( Module__name, pointer )
if( is.null(filename) ) filename <- sprintf( "%s-module.Rd", name )
lines <- gsub( "NAME", name, lines )
@@ -44,7 +46,6 @@
## at this point functions() would have failed if the
## pointer in object was not valid
- pointer <- .getModulePointer(object)
classes <- .Call( Module__classes_info, pointer )
c.txt <- if( length( classes ) ){
More information about the Rcpp-commits
mailing list