[Rcpp-commits] r413 - pkg/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jan 20 08:51:16 CET 2010


Author: romain
Date: 2010-01-20 08:51:16 +0100 (Wed, 20 Jan 2010)
New Revision: 413

Modified:
   pkg/src/ExpressionVector.cpp
   pkg/src/RcppCommon.cpp
   pkg/src/RcppCommon.h
Log:
move canUse... to RcppCommon.h (for now)

Modified: pkg/src/ExpressionVector.cpp
===================================================================
--- pkg/src/ExpressionVector.cpp	2010-01-20 07:37:59 UTC (rev 412)
+++ pkg/src/ExpressionVector.cpp	2010-01-20 07:51:16 UTC (rev 413)
@@ -30,7 +30,7 @@
 	
 	ExpressionVector::parse_error::parse_error() throw(){}
 	ExpressionVector::parse_error::~parse_error() throw(){}
-	const char* const ExpressionVector::parse_error::what() throw(){ return "parse error" ; }
+	const char* ExpressionVector::parse_error::what() throw(){ return "parse error" ; }
 	
 	ExpressionVector::ExpressionVector(SEXP x) throw(not_compatible) : VectorBase() {
 		switch( TYPEOF( x ) ){

Modified: pkg/src/RcppCommon.cpp
===================================================================
--- pkg/src/RcppCommon.cpp	2010-01-20 07:37:59 UTC (rev 412)
+++ pkg/src/RcppCommon.cpp	2010-01-20 07:51:16 UTC (rev 413)
@@ -41,18 +41,6 @@
     Rprintf("%s:%d %s\n", file, line, expression);
 }
 
-SEXP canUseCXX0X(){
-#ifdef __GNUC__
-	#ifdef __GXX_EXPERIMENTAL_CXX0X__
-		return Rf_ScalarLogical( TRUE ) ;
-	#else
-		return Rf_ScalarLogical( FALSE ) ;
-	#endif
-#else
-	return Rf_ScalarLogical( FALSE ) ;
-#endif
-}
-
 SEXP capabilities(){
 	SEXP cap = PROTECT( Rf_allocVector( LGLSXP, 3) ) ;
 	SEXP names = PROTECT( Rf_allocVector( STRSXP, 3 ) ) ;
@@ -86,7 +74,7 @@
 #endif
 }
 
-const char * const sexp_to_name(int sexp_type) {
+const char * sexp_to_name(int sexp_type) {
     switch (sexp_type) {
     case NILSXP:	return "NILSXP";
     case SYMSXP:	return "SYMSXP";

Modified: pkg/src/RcppCommon.h
===================================================================
--- pkg/src/RcppCommon.h	2010-01-20 07:37:59 UTC (rev 412)
+++ pkg/src/RcppCommon.h	2010-01-20 07:51:16 UTC (rev 413)
@@ -81,11 +81,16 @@
 int variadic_length( const Args&... args) { return sizeof...(Args) ; }
 #endif
 
-RcppExport SEXP canUseCXX0X() ;
+#ifdef HAS_VARIADIC_TEMPLATES
+RcppExport inline SEXP canUseCXX0X(){ return Rf_ScalarLogical( TRUE ); }
+#else
+RcppExport inline SEXP canUseCXX0X(){ return Rf_ScalarLogical( FALSE ); }
+#endif
+
 RcppExport SEXP test_named() ;
 RcppExport SEXP capabilities() ;
 
-const char * /*const*/ sexp_to_name(int sexp_type); 
+const char * sexp_to_name(int sexp_type); 
 
 RcppExport SEXP initRcpp() ;
 #endif



More information about the Rcpp-commits mailing list