From baba4bc3bf7cb4df523aacbb4c54b377d7be7d56 Mon Sep 17 00:00:00 2001 From: MEO265 <99362508+MEO265@users.noreply.github.com> Date: Tue, 7 May 2024 06:46:28 +0200 Subject: [PATCH] Rf_ 2 --- src/split_json.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/split_json.cpp b/src/split_json.cpp index 7473725..89381dc 100644 --- a/src/split_json.cpp +++ b/src/split_json.cpp @@ -76,10 +76,10 @@ extern "C" SEXP split_json(SEXP strSEXP) { SEXP valuesR = PROTECT(Rf_allocVector(STRSXP, values.size())); for (size_t j = 0; j < keys.size(); ++j) { - SET_STRING_ELT(keysR, j, keysNA[j] ? NA_STRING : mkChar(keys[j].c_str())); + SET_STRING_ELT(keysR, j, keysNA[j] ? NA_STRING : Rf_mkChar(keys[j].c_str())); } for (size_t j = 0; j < values.size(); ++j) { - SET_STRING_ELT(valuesR, j, valuesNA[j] ? NA_STRING : mkChar(values[j].c_str())); + SET_STRING_ELT(valuesR, j, valuesNA[j] ? NA_STRING : Rf_mkChar(values[j].c_str())); } SET_VECTOR_ELT(ans, 0, keysR);