[Rinside-commits] r85 - pkg/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jan 29 02:38:00 CET 2010


Author: edd
Date: 2010-01-29 02:37:53 +0100 (Fri, 29 Jan 2010)
New Revision: 85

Modified:
   pkg/src/RInside.cpp
   pkg/src/RInside.h
Log:
minor cleanup:  it is meant to be 'logTxt' and __LINE__ is an int
minor reindendation
copyright update


Modified: pkg/src/RInside.cpp
===================================================================
--- pkg/src/RInside.cpp	2010-01-27 22:12:24 UTC (rev 84)
+++ pkg/src/RInside.cpp	2010-01-29 01:37:53 UTC (rev 85)
@@ -2,7 +2,8 @@
 //
 // RInside.cpp: R/C++ interface class library -- Easier R embedding into C++
 //
-// Copyright (C) 2009 - 2010 Dirk Eddelbuettel
+// Copyright (C) 2009        Dirk Eddelbuettel
+// Copyright (C) 2010        Dirk Eddelbuettel and Romain Francois
 //
 // This file is part of RInside.
 //
@@ -32,7 +33,7 @@
 #endif
 
 RInside::~RInside() {		// now empty as MemBuf is internal
-    logTxT("RInside::dtor BEGIN", verbose);
+    logTxt("RInside::dtor BEGIN", verbose);
     R_dot_Last();
     R_RunExitFinalizers();
     R_CleanTempDir();
@@ -41,11 +42,11 @@
     //fpu_setup(FALSE);
     //#endif
     Rf_endEmbeddedR(0);
-    logTxT("RInside::dtor END", verbose);
+    logTxt("RInside::dtor END", verbose);
 }
 
 RInside::RInside(const int argc, const char* const argv[]) {
-    logTxT("RInside::ctor BEGIN", verbose);
+    logTxt("RInside::ctor BEGIN", verbose);
 
     verbose_m = false; 		// Default is false
 
@@ -88,15 +89,15 @@
     autoloads();    		// Force all default package to be dynamically required */
 
     if ((argc - optind) > 1){    	// for argv vector in Global Env */
-    	    // int nargv = argc - optind - 1;	// Build string vector
-    	    Rcpp::CharacterVector s_argv( argv+(1+optind), argv+argc );
-    	    assign(s_argv, "argv");
+	// int nargv = argc - optind - 1;	// Build string vector
+	Rcpp::CharacterVector s_argv( argv+(1+optind), argv+argc );
+	assign(s_argv, "argv");
     } else {
-    	    assign(R_NilValue, "argv") ;
+	assign(R_NilValue, "argv") ;
     }
   
     init_rand();    			// for tempfile() to work correctly */
-    logTxT("RInside::ctor END", verbose);
+    logTxt("RInside::ctor END", verbose);
 }
 
 void RInside::init_tempdir(void) {

Modified: pkg/src/RInside.h
===================================================================
--- pkg/src/RInside.h	2010-01-27 22:12:24 UTC (rev 84)
+++ pkg/src/RInside.h	2010-01-29 01:37:53 UTC (rev 85)
@@ -2,7 +2,8 @@
 //
 // RInside.h: R/C++ interface class library -- Easier R embedding into C++
 //
-// Copyright (C) 2009 - 2010 Dirk Eddelbuettel
+// Copyright (C) 2009        Dirk Eddelbuettel
+// Copyright (C) 2010        Dirk Eddelbuettel and Romain Francois
 //
 // This file is part of RInside.
 //
@@ -56,7 +57,7 @@
 
     template <typename T>
     void assign(const T& object, const std::string& nam){
-    	    Rcpp::Environment::global_env().assign( nam, object ) ;
+	Rcpp::Environment::global_env().assign( nam, object ) ;
     }
 
     RInside(const int argc, const char* const argv[]);
@@ -64,7 +65,7 @@
 };
 
 // simple logging help
-inline void logTxtFunction(const char* file, const char* line, const char* expression, const bool verbose) {
+inline void logTxtFunction(const char* file, const int line, const char* expression, const bool verbose) {
     if (verbose) {
 	std::cout << file << ":" << line << " expression: " << expression << std::endl;
     }
@@ -72,5 +73,5 @@
 
 #ifndef logTxT
 //#define logTxt(x, b) logTxtFunction(__FILE__, __LINE__, x, b);
-#define logTxT(x, b) 
+#define logTxt(x, b) 
 #endif



More information about the Rinside-commits mailing list