Skip to content

Commit 50489ac

Browse files
committed
Minor changes
1 parent b7ff753 commit 50489ac

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/connection.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
#include <algorithm>
1010
#include <cstring>
1111

12-
SEXP read_bin(SEXP con, size_t bytes = 64 * 1024);
12+
cpp11::sexp read_bin(cpp11::sexp con, size_t bytes = 64 * 1024);
1313
cpp11::sexp write_bin(cpp11::sexp data, cpp11::sexp con);
1414

15-
inline size_t R_WriteConnection(SEXP con, void* buf, size_t n) {
15+
inline size_t R_WriteConnection(cpp11::sexp con, void* buf, size_t n) {
1616
cpp11::writable::raws payload(n);
17-
SEXP payload_sexp = SEXP(payload);
17+
cpp11::sexp payload_sexp = cpp11::sexp(payload);
1818

1919
memcpy(RAW(payload_sexp), buf, n);
2020

src/xml2_doc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ cpp11::sexp doc_parse_raw(
211211
cpp11::strings base_url_sxp,
212212
cpp11::logicals as_html_sxp,
213213
cpp11::integers options_sxp) {
214-
std::string encoding = cpp11::as_cpp<const char*>(encoding_sxp);
215-
std::string base_url = cpp11::as_cpp<const char*>(base_url_sxp);
214+
std::string encoding = cpp11::r_string(encoding_sxp[0]);
215+
std::string base_url = cpp11::r_string(base_url_sxp[0]);
216216
bool as_html = cpp11::as_cpp<bool>(as_html_sxp);
217217
int options = cpp11::as_cpp<int>(options_sxp);
218218

0 commit comments

Comments
 (0)