[Rcpp-commits] r2486 - in pkg/Rcpp: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Nov 21 23:56:02 CET 2010
Author: romain
Date: 2010-11-21 23:56:02 +0100 (Sun, 21 Nov 2010)
New Revision: 2486
Modified:
pkg/Rcpp/ChangeLog
pkg/Rcpp/R/Module.R
Log:
grab docstrings
Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog 2010-11-21 22:51:44 UTC (rev 2485)
+++ pkg/Rcpp/ChangeLog 2010-11-21 22:56:02 UTC (rev 2486)
@@ -17,7 +17,8 @@
* inst/include/Rcpp/module/Module_generated_PointerMethod.h: idem
-
+ * R/Module.R: grab method docstrings
+
2010-11-20 John M Chambers <jmc at r-project.org>
* R/Module.R: now checks for the existence of a default constructor
Modified: pkg/Rcpp/R/Module.R
===================================================================
--- pkg/Rcpp/R/Module.R 2010-11-21 22:51:44 UTC (rev 2485)
+++ pkg/Rcpp/R/Module.R 2010-11-21 22:56:02 UTC (rev 2486)
@@ -220,13 +220,15 @@
CppMethod__invoke = CppMethod__invoke,
CppMethod__invoke_void = CppMethod__invoke_void,
CppMethod__invoke_notvoid = CppMethod__invoke_notvoid,
- dealWith = dealWith
+ dealWith = dealWith,
+ docstring = paste( METHOD$docstrings, collapse = "\n" )
)
extCall <- if( all( METHOD$void ) ){
# all methods are void, so we know we want to return invisible(NULL)
substitute(
{
+ docstring
.External(CppMethod__invoke_void, class_pointer, pointer, .pointer, ...)
invisible(NULL)
} , stuff )
@@ -235,6 +237,7 @@
# .External
substitute(
{
+ docstring
.External(CppMethod__invoke_notvoid, class_pointer, pointer, .pointer, ...)
} , stuff )
} else {
@@ -242,7 +245,8 @@
# we get from internally and we need to deal with it
substitute(
{
- dealWith( .External(CppMethod__invoke, class_pointer, pointer, .pointer, ...) )
+ docstring
+ dealWith( .External(CppMethod__invoke, class_pointer, pointer, .pointer, ...) )
} , stuff )
}
body(f, where) <- extCall
More information about the Rcpp-commits
mailing list