[Rcpp-commits] r3580 - in pkg/Rcpp: . src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 19 22:59:28 CEST 2012


Author: edd
Date: 2012-04-19 22:59:28 +0200 (Thu, 19 Apr 2012)
New Revision: 3580

Modified:
   pkg/Rcpp/ChangeLog
   pkg/Rcpp/src/Evaluator.cpp
Log:
g++ noticed that errorOccuredSym was never used, so commenting it out


Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog	2012-04-19 17:00:41 UTC (rev 3579)
+++ pkg/Rcpp/ChangeLog	2012-04-19 20:59:28 UTC (rev 3580)
@@ -1,3 +1,7 @@
+2012-04-19  Dirk Eddelbuettel  <edd at debian.org>
+
+	* src/Evaluator.cpp: errorOccuredSym never used and commented out
+
 2012-04-18  John M Chambers  <jmc at r-project.org>
 
 	* R/RcppClass.R: New version of setRcppClass, allowing R classes to

Modified: pkg/Rcpp/src/Evaluator.cpp
===================================================================
--- pkg/Rcpp/src/Evaluator.cpp	2012-04-19 17:00:41 UTC (rev 3579)
+++ pkg/Rcpp/src/Evaluator.cpp	2012-04-19 20:59:28 UTC (rev 3580)
@@ -29,11 +29,11 @@
         reset_current_error() ; 
 
         Environment RCPP = Environment::Rcpp_namespace(); 
-        static SEXP tryCatchSym = NULL, evalqSym, errorOccuredSym, getCurrentErrorMessageSym;
+        static SEXP tryCatchSym = NULL, evalqSym, getCurrentErrorMessageSym; //, errorOccuredSym;
         if (!tryCatchSym) {
-            tryCatchSym          = ::Rf_install("tryCatch");
+            tryCatchSym               = ::Rf_install("tryCatch");
             evalqSym                  = ::Rf_install("evalq");
-            errorOccuredSym           = ::Rf_install("errorOccured");
+            //errorOccuredSym           = ::Rf_install("errorOccured");
             getCurrentErrorMessageSym = ::Rf_install("getCurrentErrorMessage");
         }
 
@@ -52,10 +52,7 @@
         UNPROTECT(3) ;
         
         if( error ) {
-            std::string 
-                message(CHAR(::Rf_asChar(PROTECT(::Rf_eval(
-                                                     PROTECT(::Rf_lang1(getCurrentErrorMessageSym)),
-                                                     RCPP)))));
+            std::string message(CHAR(::Rf_asChar(PROTECT(::Rf_eval(PROTECT(::Rf_lang1(getCurrentErrorMessageSym)), RCPP)))));
             UNPROTECT( 2 ) ;
             throw eval_error(message) ;
         }



More information about the Rcpp-commits mailing list