[Rcpp-commits] r2722 - in pkg/Rcpp: . inst/include/Rcpp/module
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Dec 5 18:00:53 CET 2010
Author: romain
Date: 2010-12-05 18:00:53 +0100 (Sun, 05 Dec 2010)
New Revision: 2722
Modified:
pkg/Rcpp/ChangeLog
pkg/Rcpp/inst/include/Rcpp/module/Module_generated_Constructor.h
pkg/Rcpp/inst/include/Rcpp/module/Module_generated_class_constructor.h
Log:
fix constructor for 0 args
Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog 2010-12-05 15:27:24 UTC (rev 2721)
+++ pkg/Rcpp/ChangeLog 2010-12-05 17:00:53 UTC (rev 2722)
@@ -1,3 +1,9 @@
+2010-12-05 Romain Francois <romain at r-enthusiasts.com>
+
+ * inst/include/Rcpp/module/Module_generated_class_constructor.h: the default
+ constructor was always considered valid because of the use of &yes instead
+ of &yes_arity<0>
+
2010-12-05 Dirk Eddelbuettel <edd at debian.org>
* inst/unitTests/runit.Date.R (test.Date.getFunctions): Added a unit
Modified: pkg/Rcpp/inst/include/Rcpp/module/Module_generated_Constructor.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/module/Module_generated_Constructor.h 2010-12-05 15:27:24 UTC (rev 2721)
+++ pkg/Rcpp/inst/include/Rcpp/module/Module_generated_Constructor.h 2010-12-05 17:00:53 UTC (rev 2722)
@@ -34,7 +34,7 @@
class Constructor_0 : public Constructor_Base<Class>{
public:
virtual Class* get_new( SEXP* args, int nargs ){
- return new Class ;
+ return new Class() ;
}
virtual int nargs(){ return 0 ; }
virtual const char* signature(const std::string& class_name ){
Modified: pkg/Rcpp/inst/include/Rcpp/module/Module_generated_class_constructor.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/module/Module_generated_class_constructor.h 2010-12-05 15:27:24 UTC (rev 2721)
+++ pkg/Rcpp/inst/include/Rcpp/module/Module_generated_class_constructor.h 2010-12-05 17:00:53 UTC (rev 2722)
@@ -100,7 +100,7 @@
return *this ;
}
- self& constructor( const char* docstring="", ValidConstructor valid = &yes ){
+ self& constructor( const char* docstring="", ValidConstructor valid = &yes_arity<0>){
AddConstructor( new Constructor_0<Class>, valid , docstring) ;
return *this ;
}
More information about the Rcpp-commits
mailing list