Skip to content

Commit 1b1d706

Browse files
committed
Replace call to Rf_error() with Rcpp:stop() (fixes #10)
1 parent c104f3e commit 1b1d706

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ src/*.so
77
src/*.dll
88
src-i386
99
src-x64
10+
.claude

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# hipread (development version)
22

3+
* Replaced call to `Rf_error()` with `Rcpp::stop()` (see issue #10).
4+
35
# hipread 0.2.5
46
* Fixes problem with `hipread_list()` that caused a segfault in some situations.
57
* Require Rcpp >= 1.0.12 to avoid installation errors related to format string

src/iconv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ int my_strnlen(const char* s, int maxlen) {
7676
SEXP safeMakeChar(const char* start, size_t n, bool hasNull) {
7777
size_t m = hasNull ? readr_strnlen(start, n) : n;
7878
if (m > INT_MAX) {
79-
Rf_error("R character strings are limited to 2^31-1 bytes");
79+
Rcpp::stop("R character strings are limited to 2^31-1 bytes");
8080
}
8181
return Rf_mkCharLenCE(start, static_cast<int>(m), CE_UTF8);
8282
}

0 commit comments

Comments
 (0)