Skip to content

Commit

Permalink
Prepare for future _R_CXX_NO_REMAP_=true
Browse files Browse the repository at this point in the history
See https://rstudio.github.io/r-manuals/r-exts/The-R-API.html.

To solve the issue error -> Rf_error and warning -> Rf_warning
  • Loading branch information
constantino-garcia committed Sep 19, 2024
1 parent 2e0cf50 commit 63281d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ANN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,15 @@ void annError(const char* msg, ANNerr level)
{
if (level == ANNabort) {
#ifdef RANN
error("RANN: %s",msg);
Rf_error("RANN: %s",msg);
#else
cerr << "ANN: ERROR------->" << msg << "<-------------ERROR\n";
exit(1);
#endif
}
else {
#ifdef RANN
warning("RANN: %s",msg);
Rf_warning("RANN: %s",msg);
#else
cerr << "ANN: WARNING----->" << msg << "<-------------WARNING\n";
#endif
Expand Down

0 comments on commit 63281d7

Please sign in to comment.