From 3b0e112f4bafa789a60ddfd87a2bad0fe3f13b98 Mon Sep 17 00:00:00 2001 From: Matthias Ollech <99362508+MEO265@users.noreply.github.com> Date: Tue, 7 May 2024 20:10:25 +0200 Subject: [PATCH] fix: Explicit Rf_ --- src/split_json.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/split_json.cpp b/src/split_json.cpp index 5993d87..9ed3db4 100644 --- a/src/split_json.cpp +++ b/src/split_json.cpp @@ -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."); } - int n = length(strVecSEXP); + int n = Rf_length(strVecSEXP); SEXP result = PROTECT(Rf_allocVector(VECSXP, n)); for (int i = 0; i < n; i++) {