[Rcpp-commits] r1206 - pkg/Rcpp/inst/include/Rcpp/traits

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed May 12 11:04:42 CEST 2010


Author: romain
Date: 2010-05-12 11:04:41 +0200 (Wed, 12 May 2010)
New Revision: 1206

Modified:
   pkg/Rcpp/inst/include/Rcpp/traits/r_sexptype_traits.h
   pkg/Rcpp/inst/include/Rcpp/traits/r_type_traits.h
   pkg/Rcpp/inst/include/Rcpp/traits/wrap_type_traits.h
Log:
adding an extra ifdef __GNUC__ protection for long long types

Modified: pkg/Rcpp/inst/include/Rcpp/traits/r_sexptype_traits.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/traits/r_sexptype_traits.h	2010-05-12 08:21:06 UTC (rev 1205)
+++ pkg/Rcpp/inst/include/Rcpp/traits/r_sexptype_traits.h	2010-05-12 09:04:41 UTC (rev 1206)
@@ -57,6 +57,7 @@
 template<> struct r_sexptype_traits<unsigned short>{ enum{ rtype = INTSXP } ; } ;
 
 /* long long int */
+#ifdef __GNUC__
 #ifdef LONG_LONG_MAX
 template<> struct r_sexptype_traits<long long int>{ enum{ rtype = REALSXP } ; } ;
 #endif
@@ -65,6 +66,7 @@
 #ifdef ULONG_LONG_MAX
 template<> struct r_sexptype_traits<unsigned long long int>{ enum{ rtype = REALSXP } ; } ;
 #endif
+#endif
 
 /**
  * Indicates if a primitive type needs a static_cast

Modified: pkg/Rcpp/inst/include/Rcpp/traits/r_type_traits.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/traits/r_type_traits.h	2010-05-12 08:21:06 UTC (rev 1205)
+++ pkg/Rcpp/inst/include/Rcpp/traits/r_type_traits.h	2010-05-12 09:04:41 UTC (rev 1206)
@@ -111,6 +111,7 @@
 template<> struct r_type_traits<unsigned short>{ typedef r_type_primitive_tag r_category ; } ;
 template<> struct r_type_traits< std::pair<const std::string,unsigned short> >{ typedef r_type_primitive_tag r_category ; } ;
 
+#ifdef __GNUC__
 /* long long int */
 #ifdef LONG_LONG_MAX
 template<> struct r_type_traits<long long int>{ typedef r_type_primitive_tag r_category ; } ;
@@ -122,8 +123,8 @@
 template<> struct r_type_traits<unsigned long long int>{ typedef r_type_primitive_tag r_category ; } ;
 template<> struct r_type_traits< std::pair<const std::string,unsigned long long int> >{ typedef r_type_primitive_tag r_category ; } ;
 #endif
+#endif
 
-
 } // traits
 } // Rcpp
 

Modified: pkg/Rcpp/inst/include/Rcpp/traits/wrap_type_traits.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/traits/wrap_type_traits.h	2010-05-12 08:21:06 UTC (rev 1205)
+++ pkg/Rcpp/inst/include/Rcpp/traits/wrap_type_traits.h	2010-05-12 09:04:41 UTC (rev 1206)
@@ -71,6 +71,7 @@
 template <> struct wrap_type_traits<short> { typedef wrap_type_primitive_tag wrap_category; } ;
 template <> struct wrap_type_traits<unsigned short> { typedef wrap_type_primitive_tag wrap_category; } ;
 
+#ifdef __GNUC__
 #ifdef LONG_LONG_MAX
 template <> struct wrap_type_traits<long long int> { typedef wrap_type_primitive_tag wrap_category; } ;
 #endif
@@ -78,6 +79,7 @@
 #ifdef ULONG_LONG_MAX
 template <> struct wrap_type_traits<unsigned long long int> { typedef wrap_type_primitive_tag wrap_category; } ;
 #endif 
+#endif
 
 } // namespace traits
 } // namespace Rcpp



More information about the Rcpp-commits mailing list