[Rcpp-commits] r4153 - in pkg/Rcpp: . inst/include/Rcpp
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Dec 12 15:43:48 CET 2012
Author: romain
Date: 2012-12-12 15:43:48 +0100 (Wed, 12 Dec 2012)
New Revision: 4153
Modified:
pkg/Rcpp/ChangeLog
pkg/Rcpp/inst/include/Rcpp/Symbol.h
Log:
some changes in Symbol
Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog 2012-12-11 17:57:13 UTC (rev 4152)
+++ pkg/Rcpp/ChangeLog 2012-12-12 14:43:48 UTC (rev 4153)
@@ -1,3 +1,7 @@
+2012-12-12 Romain Francois <romain at r-enthusiasts.com>
+
+ * include/Rcpp/Symbol.h: c_str becomes const and added Symbol::operator==(const char* )
+
2012-12-11 JJ Allaire <jj at rstudio.org>
* R/Attributes.R: always print output when shared library is not created
Modified: pkg/Rcpp/inst/include/Rcpp/Symbol.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/Symbol.h 2012-12-11 17:57:13 UTC (rev 4152)
+++ pkg/Rcpp/inst/include/Rcpp/Symbol.h 2012-12-12 14:43:48 UTC (rev 4153)
@@ -2,7 +2,7 @@
//
// Symbol.h: Rcpp R/C++ interface class library -- access R environments
//
-// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+// Copyright (C) 2010 - 2012 Dirk Eddelbuettel and Romain Francois
//
// This file is part of Rcpp.
//
@@ -52,7 +52,9 @@
*/
~Symbol() ;
- inline const char* c_str(){ return CHAR(PRINTNAME(m_sexp)) ; }
+ inline const char* c_str() const { return CHAR(PRINTNAME(m_sexp)) ; }
+
+ inline bool operator==(const char* other) const { return ! strcmp(other, c_str() ); }
};
} // namespace Rcpp
More information about the Rcpp-commits
mailing list