Skip to content

Commit

Permalink
replace call to Rf_error with Rcpp::stop
Browse files Browse the repository at this point in the history
  • Loading branch information
Enchufa2 committed Dec 30, 2024
1 parent 1a95b79 commit f9e193a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: units
Version: 0.8-5.7
Version: 0.8-5.8
Title: Measurement Units for R Vectors
Authors@R: c(person("Edzer", "Pebesma", role = c("aut", "cre"), email = "edzer.pebesma@uni-muenster.de", comment = c(ORCID = "0000-0001-8049-7069")),
person("Thomas", "Mailund", role = "aut", email = "mailund@birc.au.dk"),
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

* Fix simplification of inverse units; #378

* Replace call to `Rf_error()` with `Rcpp::stop()`; RcppCore/Rcpp#1247

# version 0.8-5

* avoid -Wformat-security warning on CRAN
Expand Down
2 changes: 1 addition & 1 deletion src/udunits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extern "C" {
void r_error_fn(const char* fmt, va_list args) {
char buf[256];
vsnprintf(buf, (size_t) 256, fmt, args);
Rf_error("%s", buf);
Rcpp::stop("%s", buf);
}
}

Expand Down

0 comments on commit f9e193a

Please sign in to comment.