From 4a8d30f9e0be955016c174b8a21965694c90b576 Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Tue, 28 Nov 2023 07:59:14 -0600 Subject: [PATCH] Update format string in test package by updating generated RcppExports file (#1289) * Regenerated two files to update printf format string * Roll micro version and date --- ChangeLog | 5 +++++ DESCRIPTION | 4 ++-- inst/include/Rcpp/config.h | 4 ++-- inst/tinytest/testRcppInterfaceExporter/R/RcppExports.R | 2 +- .../tinytest/testRcppInterfaceExporter/src/RcppExports.cpp | 7 ++++++- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index f0e73a4bd..5d7cc8bde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2023-11-28 Dirk Eddelbuettel + + * inst/tinytest/testRcppInterfaceExporter/R/RcppExports.R: Regenerated + * inst/tinytest/testRcppInterfaceExporter/src/RcppExports.cpp: Idem + 2023-11-26 Dirk Eddelbuettel * DESCRIPTION (Version, Date): Roll micro version diff --git a/DESCRIPTION b/DESCRIPTION index 1e52e6bcf..6c16a42ec 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: Rcpp Title: Seamless R and C++ Integration -Version: 1.0.11.5 -Date: 2023-11-26 +Version: 1.0.11.6 +Date: 2023-11-28 Author: Dirk Eddelbuettel, Romain Francois, JJ Allaire, Kevin Ushey, Qiang Kou, Nathan Russell, Inaki Ucar, Douglas Bates and John Chambers Maintainer: Dirk Eddelbuettel diff --git a/inst/include/Rcpp/config.h b/inst/include/Rcpp/config.h index c0cb9e4f4..b796d40d6 100644 --- a/inst/include/Rcpp/config.h +++ b/inst/include/Rcpp/config.h @@ -30,7 +30,7 @@ #define RCPP_VERSION_STRING "1.0.11" // the current source snapshot (using four components, if a fifth is used in DESCRIPTION we ignore it) -#define RCPP_DEV_VERSION RcppDevVersion(1,0,11,5) -#define RCPP_DEV_VERSION_STRING "1.0.11.5" +#define RCPP_DEV_VERSION RcppDevVersion(1,0,11,6) +#define RCPP_DEV_VERSION_STRING "1.0.11.6" #endif diff --git a/inst/tinytest/testRcppInterfaceExporter/R/RcppExports.R b/inst/tinytest/testRcppInterfaceExporter/R/RcppExports.R index a92dbbc8b..a9f09aff4 100644 --- a/inst/tinytest/testRcppInterfaceExporter/R/RcppExports.R +++ b/inst/tinytest/testRcppInterfaceExporter/R/RcppExports.R @@ -8,5 +8,5 @@ test_cpp_interface <- function(x, fast = FALSE) { # Register entry points for exported C++ functions methods::setLoadAction(function(ns) { - .Call('_testRcppInterfaceExporter_RcppExport_registerCCallable', PACKAGE = 'testRcppInterfaceExporter') + .Call(`_testRcppInterfaceExporter_RcppExport_registerCCallable`) }) diff --git a/inst/tinytest/testRcppInterfaceExporter/src/RcppExports.cpp b/inst/tinytest/testRcppInterfaceExporter/src/RcppExports.cpp index cdc328687..a6beb9b53 100644 --- a/inst/tinytest/testRcppInterfaceExporter/src/RcppExports.cpp +++ b/inst/tinytest/testRcppInterfaceExporter/src/RcppExports.cpp @@ -8,6 +8,11 @@ using namespace Rcpp; +#ifdef RCPP_USE_GLOBAL_ROSTREAM +Rcpp::Rostream& Rcpp::Rcout = Rcpp::Rcpp_cout_get(); +Rcpp::Rostream& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get(); +#endif + // test_cpp_interface SEXP test_cpp_interface(SEXP x, bool fast); static SEXP _testRcppInterfaceExporter_test_cpp_interface_try(SEXP xSEXP, SEXP fastSEXP) { @@ -38,7 +43,7 @@ RcppExport SEXP _testRcppInterfaceExporter_test_cpp_interface(SEXP xSEXP, SEXP f if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen;