[Rcpp-commits] r901 - in pkg/Rcpp: . inst src src/Rcpp

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Mar 15 14:07:03 CET 2010


Author: romain
Date: 2010-03-15 14:07:03 +0100 (Mon, 15 Mar 2010)
New Revision: 901

Modified:
   pkg/Rcpp/DESCRIPTION
   pkg/Rcpp/inst/ChangeLog
   pkg/Rcpp/src/Function.cpp
   pkg/Rcpp/src/Rcpp/Function.h
Log:
Rcpp::Function gains a body method

Modified: pkg/Rcpp/DESCRIPTION
===================================================================
--- pkg/Rcpp/DESCRIPTION	2010-03-15 08:26:44 UTC (rev 900)
+++ pkg/Rcpp/DESCRIPTION	2010-03-15 13:07:03 UTC (rev 901)
@@ -1,6 +1,6 @@
 Package: Rcpp
 Title: Rcpp R/C++ interface package
-Version: 0.7.9.1
+Version: 0.7.9.2
 Date: $Date$
 Author: Dirk Eddelbuettel and Romain Francois, with contributions 
  by Simon Urbanek and David Reiss; based on code written during 

Modified: pkg/Rcpp/inst/ChangeLog
===================================================================
--- pkg/Rcpp/inst/ChangeLog	2010-03-15 08:26:44 UTC (rev 900)
+++ pkg/Rcpp/inst/ChangeLog	2010-03-15 13:07:03 UTC (rev 901)
@@ -1,3 +1,8 @@
+2010-03-15  Romain Francois <romain at r-enthusiasts.com>
+
+	* src/Rcpp/Function.h : Function gains a body method to retrieve the body
+	of the function (using the BODY macro from Rinternals.h)
+
 2010-03-14  Romain Francois <romain at r-enthusiasts.com>
 
 	* src/Rcpp/S4.h : Rcpp::S4 gains a new constructor taking a string 

Modified: pkg/Rcpp/src/Function.cpp
===================================================================
--- pkg/Rcpp/src/Function.cpp	2010-03-15 08:26:44 UTC (rev 900)
+++ pkg/Rcpp/src/Function.cpp	2010-03-15 13:07:03 UTC (rev 901)
@@ -66,4 +66,8 @@
 		return CLOENV(m_sexp) ;
 	}
 	
+	SEXP Function::body() const {
+		return BODY( m_sexp ) ;
+	}
+	
 } // namespace Rcpp

Modified: pkg/Rcpp/src/Rcpp/Function.h
===================================================================
--- pkg/Rcpp/src/Rcpp/Function.h	2010-03-15 08:26:44 UTC (rev 900)
+++ pkg/Rcpp/src/Rcpp/Function.h	2010-03-15 13:07:03 UTC (rev 901)
@@ -126,6 +126,11 @@
 	 */
 	SEXP environment() const throw(not_a_closure) ;
 	
+	/**
+	 * Returns the body of the function
+	 */
+	SEXP body() const ;
+	 
 	~Function() ;
 };
 



More information about the Rcpp-commits mailing list