Skip to content

Commit 66f4c60

Browse files
committed
Remove unnecessary R_GetConnection()
1 parent 44eddbe commit 66f4c60

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

src/connection.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
SEXP read_bin(SEXP con, size_t bytes = 64 * 1024);
1313
SEXP write_bin(SEXP data, SEXP con);
1414

15-
inline SEXP R_GetConnection(SEXP con) { return con; }
1615

1716
inline size_t R_WriteConnection(SEXP con, void* buf, size_t n) {
1817
SEXP payload = PROTECT(Rf_allocVector(RAWSXP, n));

src/xml2_output.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ cpp11::sexp doc_write_connection(SEXP doc_sxp, SEXP connection, SEXP encoding_sx
128128
const char* encoding = CHAR(STRING_ELT(encoding_sxp, 0));
129129
int options = INTEGER(options_sxp)[0];
130130

131-
SEXP con = R_GetConnection(connection);
132-
133131
xmlSaveCtxtPtr savectx = xmlSaveToIO(
134132
reinterpret_cast<xmlOutputWriteCallback>(xml_write_callback),
135133
NULL,
@@ -201,7 +199,6 @@ cpp11::sexp node_write_file(SEXP node_sxp, SEXP path_sxp, SEXP encoding_sxp, SEX
201199
cpp11::sexp node_write_connection(SEXP node_sxp, SEXP connection, SEXP encoding_sxp, SEXP options_sxp) {
202200
BEGIN_CPP
203201
XPtrNode node(node_sxp);
204-
SEXP con = R_GetConnection(connection);
205202
const char* encoding = CHAR(STRING_ELT(encoding_sxp, 0));
206203
int options = INTEGER(options_sxp)[0];
207204

0 commit comments

Comments
 (0)