[Rcpp-commits] r4084 - pkg/Rcpp/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Dec 5 19:10:09 CET 2012


Author: jjallaire
Date: 2012-12-05 19:10:09 +0100 (Wed, 05 Dec 2012)
New Revision: 4084

Modified:
   pkg/Rcpp/src/AttributesGen.cpp
Log:
always include Rcpp.h before generated shims

Modified: pkg/Rcpp/src/AttributesGen.cpp
===================================================================
--- pkg/Rcpp/src/AttributesGen.cpp	2012-12-05 18:00:12 UTC (rev 4083)
+++ pkg/Rcpp/src/AttributesGen.cpp	2012-12-05 18:10:09 UTC (rev 4084)
@@ -698,7 +698,9 @@
                      const SourceFileAttributes& attributes,
                      bool includePrototype,
                      const std::string& contextId) {
-      
+        
+        // always include Rcpp.h in case the user didn't
+        ostr << "#include <Rcpp.h>" << std::endl;
         // process each attribute
         for(std::vector<Attribute>::const_iterator 
             it = attributes.begin(); it != attributes.end(); ++it) {



More information about the Rcpp-commits mailing list