[Rcpp-commits] r3850 - in pkg/Rcpp: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Oct 29 11:00:19 CET 2012


Author: romain
Date: 2012-10-29 11:00:19 +0100 (Mon, 29 Oct 2012)
New Revision: 3850

Modified:
   pkg/Rcpp/ChangeLog
   pkg/Rcpp/R/Module.R
Log:
taking care of a check warning

Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog	2012-10-29 03:06:55 UTC (rev 3849)
+++ pkg/Rcpp/ChangeLog	2012-10-29 10:00:19 UTC (rev 3850)
@@ -1,3 +1,7 @@
+2012-10-29  Romain Francois <romain at r-enthusiasts.com>
+
+    * R/Module.R: Taking care of a check warning
+
 2012-10-28  Dirk Eddelbuettel  <edd at debian.org>
 
 	* inst/include/Rcpp/Rmath.h: Beginnings of a namespave 'R' around
@@ -12,54 +16,54 @@
 
 2012-10-25  Romain Francois <romain at r-enthusiasts.com>
 
-        * include/Rcpp/internal/wrap.h: wrapping module object with the help
-        of the RCPP_EXPOSED_CLASS
-        * include/Rcpp/module/macros.h: improving the macros so that wrap and as
-        are covered
-        * include/Rcpp/traits/wrap_type_traits.h: wrapping module objects
-        * include/Rcpp/module/Module_generated_class_factory.h : factories are alternatives
-        to constructors. For now, we can expose as factories any free function
-        that returns a pointer to the target class
-        * include/Rcpp/module/Module_generated_Factory.h : factories
-        * include/Rcpp/Module.h: exposing factories
+    * include/Rcpp/internal/wrap.h: wrapping module object with the help
+    of the RCPP_EXPOSED_CLASS
+    * include/Rcpp/module/macros.h: improving the macros so that wrap and as
+    are covered
+    * include/Rcpp/traits/wrap_type_traits.h: wrapping module objects
+    * include/Rcpp/module/Module_generated_class_factory.h : factories are alternatives
+    to constructors. For now, we can expose as factories any free function
+    that returns a pointer to the target class
+    * include/Rcpp/module/Module_generated_Factory.h : factories
+    * include/Rcpp/Module.h: exposing factories
 
 2012-10-24  Romain Francois <romain at r-enthusiasts.com>
 
-        * include/Rcpp/traits/is_pointer.h: traits to identify if a type is a pointer
-        * include/Rcpp/traits/un_pointer.h: traits to remove a pointer
-        * include/Rcpp/module/Module_generated_get_return_type.h : handle pointer return types
-        * include/Rcpp/config.h: define RCPP_HAS_DEMANGLING for MAC OS <= 10.7 (up to Lion)
-        * include/Rcpp/module/macros.h: new file that contains macro to help with modules
-        * include/Rcpp/traits/r_type_traits.h : new tag to allow as<T> where T
-        is some class exposed in a module
-        * include/Rcpp/as.h : implementation of as<T> in that case
+    * include/Rcpp/traits/is_pointer.h: traits to identify if a type is a pointer
+    * include/Rcpp/traits/un_pointer.h: traits to remove a pointer
+    * include/Rcpp/module/Module_generated_get_return_type.h : handle pointer return types
+    * include/Rcpp/config.h: define RCPP_HAS_DEMANGLING for MAC OS <= 10.7 (up to Lion)
+    * include/Rcpp/module/macros.h: new file that contains macro to help with modules
+    * include/Rcpp/traits/r_type_traits.h : new tag to allow as<T> where T
+    is some class exposed in a module
+    * include/Rcpp/as.h : implementation of as<T> in that case
 
 2012-10-23  Romain Francois <romain at r-enthusiasts.com>
+    
+    * include/Rcpp/internal/wrap.h: new function module_wrap used internally by modules
+    * include/Rcpp/module/Module_generated_CppMethod.h: using module_wrap and
+    simplified the code (removing 35% of the generated code now rendered useless)
+    * include/Rcpp/module/Module_generated_PointerCppMethod.h: using module_wrap and
+    simplified the code
+    * include/Rcpp/traits/module_wrap_traits.h : new file. helping implementation of
+    module_wrap
+    
+    * R/00_classes.R: C++OverloadedMethods gets the field "nargs" to capture
+    the number of arguments
+    
+    * R/01_show.R: cleanup
+    
+    * R/Module.R: handle the case where a method has no argument. In that
+    case, the ellipsis does not end up in the formals
+    
+    * include/Rcpp/Module.h: exposing nargs in C++OverloadedMethods
 
-        * include/Rcpp/internal/wrap.h: new function module_wrap used internally by modules
-        * include/Rcpp/module/Module_generated_CppMethod.h: using module_wrap and
-        simplified the code (removing 35% of the generated code now rendered useless)
-        * include/Rcpp/module/Module_generated_PointerCppMethod.h: using module_wrap and
-        simplified the code
-        * include/Rcpp/traits/module_wrap_traits.h : new file. helping implementation of
-        module_wrap
-
-        * R/00_classes.R: C++OverloadedMethods gets the field "nargs" to capture
-        the number of arguments
-
-        * R/01_show.R: cleanup
-
-        * R/Module.R: handle the case where a method has no argument. In that
-        case, the ellipsis does not end up in the formals
-
-        * include/Rcpp/Module.h: exposing nargs in C++OverloadedMethods
-
 2012-10-22  Romain Francois <romain at r-enthusiasts.com>
 
-        * include/Rcpp/as.h: support for as<> for module objects
-        * include/Rcpp/Module.h: idem
-        * include/Rcpp/traits/r_type_traits.h: idem
-        * src/Module.cpp: idem
+    * include/Rcpp/as.h: support for as<> for module objects
+    * include/Rcpp/Module.h: idem
+    * include/Rcpp/traits/r_type_traits.h: idem
+    * src/Module.cpp: idem
 
 2012-10-21  Romain Francois <romain at r-enthusiasts.com>
 

Modified: pkg/Rcpp/R/Module.R
===================================================================
--- pkg/Rcpp/R/Module.R	2012-10-29 03:06:55 UTC (rev 3849)
+++ pkg/Rcpp/R/Module.R	2012-10-29 10:00:19 UTC (rev 3850)
@@ -287,12 +287,6 @@
 
 method_wrapper <- function( METHOD, where ){
         noargs <- all( METHOD$nargs == 0 ) 
-        if( noargs ){
-            f <- function() NULL
-        } else { 
-            f <- function(...) NULL
-        }
-
         stuff <- list(
             class_pointer = METHOD$class_pointer,
             pointer = METHOD$pointer,
@@ -302,7 +296,10 @@
             dealWith = dealWith,
             docstring = METHOD$info("")
         )
-                   
+        f <- function(...) NULL
+        if( noargs ){
+            formals(f) <- NULL
+        } 
         
         extCall <- if( noargs ) { 
             if( all( METHOD$void ) ){



More information about the Rcpp-commits mailing list