[Rcpp-commits] r3101 - pkg/RcppEigen/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jun 23 16:55:44 CEST 2011


Author: dmbates
Date: 2011-06-23 16:55:44 +0200 (Thu, 23 Jun 2011)
New Revision: 3101

Modified:
   pkg/RcppEigen/src/RcppEigen.cpp
Log:
Use the correct macros for eigen_version.


Modified: pkg/RcppEigen/src/RcppEigen.cpp
===================================================================
--- pkg/RcppEigen/src/RcppEigen.cpp	2011-06-23 14:54:58 UTC (rev 3100)
+++ pkg/RcppEigen/src/RcppEigen.cpp	2011-06-23 14:55:44 UTC (rev 3101)
@@ -25,17 +25,16 @@
 extern "C" SEXP eigen_version(SEXP single_){
 
     bool single = as<bool>( single_) ;
-    int major = 3, minor = 0, patch = 1;
     if( single ){
-	return wrap( 10000*major +
-		     100*minor + 
-		     patch ) ;
+	return wrap( 10000 * EIGEN_WORLD_VERSION +
+		     100 * EIGEN_MAJOR_VERSION + 
+		     EIGEN_MINOR_VERSION ) ;
     }
 
     IntegerVector version = 
-	IntegerVector::create(_["major"] = major,
-			      _["minor"] = minor,
-			      _["patch"] = patch);
+	IntegerVector::create(_["major"] = EIGEN_WORLD_VERSION,
+			      _["minor"] = EIGEN_MAJOR_VERSION,
+			      _["patch"] = EIGEN_MINOR_VERSION);
 
    return version ;
 



More information about the Rcpp-commits mailing list