[Rcpp-commits] r4273 - in pkg/Rcpp: . R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Feb 27 20:57:55 CET 2013


Author: jjallaire
Date: 2013-02-27 20:57:54 +0100 (Wed, 27 Feb 2013)
New Revision: 4273

Modified:
   pkg/Rcpp/ChangeLog
   pkg/Rcpp/R/Rcpp.package.skeleton.R
   pkg/Rcpp/inst/NEWS.Rd
Log:
eliminated spurious empty hello world function definition in Rcpp.package.skeleton

Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog	2013-02-24 12:09:02 UTC (rev 4272)
+++ pkg/Rcpp/ChangeLog	2013-02-27 19:57:54 UTC (rev 4273)
@@ -1,3 +1,8 @@
+2013-02-27 JJ Allaire <jj at rstudio.org>
+
+        * R/Rcpp.package.skeleton.R: eliminated spurious empty hello world
+        function definition in Rcpp.package.skeleton
+
 2013-02-24 JJ Allaire <jj at rstudio.org>
 
         * R/Attributes.R: add global package include file to RcppExports.cpp

Modified: pkg/Rcpp/R/Rcpp.package.skeleton.R
===================================================================
--- pkg/Rcpp/R/Rcpp.package.skeleton.R	2013-02-24 12:09:02 UTC (rev 4272)
+++ pkg/Rcpp/R/Rcpp.package.skeleton.R	2013-02-27 19:57:54 UTC (rev 4273)
@@ -38,7 +38,7 @@
 	if( !length(list) ){
 		fake <- TRUE
 		assign( "Rcpp.fake.fun", function(){}, envir = env )
-		if( example_code ){
+		if( example_code && !isTRUE(attributes)){ 
 			assign( "rcpp_hello_world", function(){}, envir = env )
 			remove_hello_world <- TRUE
 		} else {
@@ -63,7 +63,7 @@
 	call <- call[ c( 1L, which( names(call) %in% names(formals(package.skeleton)))) ]
 
 	if( fake ){
-		call[["list"]] <- c( if( isTRUE(example_code)) "rcpp_hello_world" , "Rcpp.fake.fun" )
+		call[["list"]] <- c( if( isTRUE(example_code) && !isTRUE(attributes)) "rcpp_hello_world" , "Rcpp.fake.fun" )
 	}
 
 	tryCatch( eval( call, envir = env ), error = function(e){

Modified: pkg/Rcpp/inst/NEWS.Rd
===================================================================
--- pkg/Rcpp/inst/NEWS.Rd	2013-02-24 12:09:02 UTC (rev 4272)
+++ pkg/Rcpp/inst/NEWS.Rd	2013-02-27 19:57:54 UTC (rev 4273)
@@ -27,6 +27,8 @@
         \item Return invisibly from void functions
         \item Ensure that line comments invalidate block comments when
         parsing for attributes
+        \item Eliminated spurious empty hello world function definition
+        in Rcpp.package.skeleton
     }
     \item Changes in Rcpp API:
     \itemize{



More information about the Rcpp-commits mailing list