Skip to content

Commit 8029c30

Browse files
committed
Minor things
1 parent 33d6c7e commit 8029c30

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/xml2_doc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ cpp11::logicals doc_has_root(cpp11::sexp x_sxp) {
259259
cpp11::strings doc_url(cpp11::sexp doc_sxp) {
260260
XPtrDoc doc(doc_sxp);
261261
if (doc->URL == NULL) {
262-
return Rf_ScalarString(NA_STRING);
262+
return cpp11::writable::strings({NA_STRING});
263263
}
264264

265265
return cpp11::as_sexp((const char*) doc->URL);

src/xml2_init.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ extern "C" {
5959
}
6060

6161
[[cpp11::register]]
62-
cpp11::sexp libxml2_version_(){
63-
return Rf_mkString(LIBXML_DOTTED_VERSION);
62+
cpp11::strings libxml2_version_(){
63+
return cpp11::strings({LIBXML_DOTTED_VERSION});
6464
}

0 commit comments

Comments
 (0)