Skip to content

Commit

Permalink
fix: Explicit Rf_
Browse files Browse the repository at this point in the history
  • Loading branch information
MEO265 committed May 7, 2024
1 parent 341cc5a commit 3b0e112
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/split_json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ extern "C" SEXP split_json(SEXP strSEXP) {
}

extern "C" SEXP split_ndjson(SEXP strVecSEXP) {
if (!isString(strVecSEXP)) {
error("Input must be a character vector.");
if (!Rf_isString(strVecSEXP)) {
Rf_error("Input must be a character vector.");

Check warning on line 99 in src/split_json.cpp

View check run for this annotation

Codecov / codecov/patch

src/split_json.cpp#L99

Added line #L99 was not covered by tests
}

int n = length(strVecSEXP);
int n = Rf_length(strVecSEXP);
SEXP result = PROTECT(Rf_allocVector(VECSXP, n));

for (int i = 0; i < n; i++) {
Expand Down

0 comments on commit 3b0e112

Please sign in to comment.