[Rcpp-commits] r3831 - in pkg/Rcpp/inst/include/Rcpp: . module

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Oct 24 21:31:18 CEST 2012


Author: romain
Date: 2012-10-24 21:31:17 +0200 (Wed, 24 Oct 2012)
New Revision: 3831

Modified:
   pkg/Rcpp/inst/include/Rcpp/as.h
   pkg/Rcpp/inst/include/Rcpp/module/macros.h
Log:
renamed RCPP_EXPOSED_CLASS

Modified: pkg/Rcpp/inst/include/Rcpp/as.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/as.h	2012-10-24 19:15:18 UTC (rev 3830)
+++ pkg/Rcpp/inst/include/Rcpp/as.h	2012-10-24 19:31:17 UTC (rev 3831)
@@ -66,7 +66,7 @@
         /** handling T such that T is exposed by a module */
         template <typename T> T as(SEXP x, ::Rcpp::traits::r_type_module_object_tag ){
             T* obj = as_module_object<T>(x) ;
-            return &obj ;
+            return *obj ;
         }
         
     }

Modified: pkg/Rcpp/inst/include/Rcpp/module/macros.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/module/macros.h	2012-10-24 19:15:18 UTC (rev 3830)
+++ pkg/Rcpp/inst/include/Rcpp/module/macros.h	2012-10-24 19:31:17 UTC (rev 3831)
@@ -26,6 +26,6 @@
  *  as a parameter of a function or method exposed by modules. This defines
  *  the necessary trait that makes the class as<>'able
  */
-#define R_TYPE_TRAITS(CLASS) namespace Rcpp{ namespace traits { template<> struct r_type_traits< CLASS >{ typedef r_type_module_object_tag r_category ; } ; }}
+#define RCPP_EXPOSED_CLASS(CLASS) namespace Rcpp{ namespace traits { template<> struct r_type_traits< CLASS >{ typedef r_type_module_object_tag r_category ; } ; }}
 
 #endif



More information about the Rcpp-commits mailing list