Skip to content

Commit

Permalink
Merge pull request #497 from RcppCore/feature/warningcall
Browse files Browse the repository at this point in the history
Add warningcall() (closes #495)
  • Loading branch information
eddelbuettel committed Jun 25, 2016
2 parents 3e208ff + 8e9e398 commit 82718ee
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2016-06-23 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version): Rolling minor version

* inst/include/Rcpp/exceptions.h (Rcpp): Also expose Rf_warningcall()
within Rcpp namespace (without leading Rf_)

2016-06-20 Qin Wenfeng <mail@qinwenfeng.com>

* inst/include/Rcpp/exceptions.h: add RCPP_USING_UTF8_ERROR_STRING macro
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: Rcpp
Title: Seamless R and C++ Integration
Version: 0.12.5.2
Date: 2016-05-22
Version: 0.12.5.3
Date: 2016-06-23
Author: Dirk Eddelbuettel, Romain Francois, JJ Allaire, Kevin Ushey,
Qiang Kou, Douglas Bates and John Chambers
Maintainer: Dirk Eddelbuettel <edd@debian.org>
Expand Down
2 changes: 2 additions & 0 deletions inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
mailing list bug report by Masaki Tsuda)
\item Allow for UTF-8 encoding in error messages via
\code{RCPP_USING_UTF8_ERROR_STRING} macro (Qin Wenfeng in \ghpr{493})
\item The R function \code{Rf_warningcall} is now provided as well (as
usual without leading Rf_) (\ghpr{497} fixing \ghit{495})
}
\item Changes in Rcpp Sugar:
\itemize{
Expand Down
8 changes: 7 additions & 1 deletion inst/include/Rcpp/print.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
//
// Copyright (C) 2015 Dirk Eddelbuettel
// Copyright (C) 2015 - 2016 Dirk Eddelbuettel
//
// This file is part of Rcpp.
//
Expand All @@ -26,6 +26,12 @@ inline void print(SEXP s) {
Rf_PrintValue(s); // defined in Rinternals.h
}

inline void warningcall(SEXP call, const std::string & s) {
Rf_warningcall(call, s.c_str());
}

// also note that warning() is defined in file exceptions.h

}

#endif
Expand Down

0 comments on commit 82718ee

Please sign in to comment.