Skip to content

Commit 989db58

Browse files
committed
No re-map everywhere
1 parent 8fb8357 commit 989db58

File tree

9 files changed

+25
-4
lines changed

9 files changed

+25
-4
lines changed

src/connection.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#pragma once
22

3+
#define R_NO_REMAP
34
#include <Rinternals.h>
5+
#undef R_NO_REMAP
46

57
#include <algorithm>
68
#include <cstring>

src/init.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
#include <R.h>
1+
#define R_NO_REMAP
22
#include <Rinternals.h>
3+
#undef R_NO_REMAP
4+
5+
#include <R.h>
36
#include <stdlib.h> // for NULL
47
#include <R_ext/Rdynload.h>
58

src/xml2_doc.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
#define R_NO_REMAP
12
#include <Rinternals.h>
3+
#undef R_NO_REMAP
24

35
#include <libxml/parser.h>
46
#include <libxml/HTMLparser.h>

src/xml2_namespace.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
#define R_NO_REMAP
12
#include <Rinternals.h>
3+
#undef R_NO_REMAP
4+
25
#include <libxml/tree.h>
36

47
#include "xml2_types.h"

src/xml2_output.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
#define R_NO_REMAP
12
#include <Rinternals.h>
2-
#include "connection.h"
3+
#undef R_NO_REMAP
34

45
#include <libxml/tree.h>
56
#include <libxml/HTMLtree.h>
67
#include <libxml/xmlsave.h>
78

9+
#include "connection.h"
810
#include "xml2_types.h"
911
#include "xml2_utils.h"
1012

src/xml2_schema.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
#undef R_NO_REMAP
44

55
#include <libxml/xmlschemas.h>
6-
#include "xml2_types.h"
76
#include <vector>
87
#include <string>
8+
9+
#include "xml2_types.h"
910
#include "xml2_utils.h"
1011

1112
void handleSchemaError(void* userData, xmlError* error) {

src/xml2_url.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
#define R_NO_REMAP
12
#include <Rinternals.h>
3+
#undef R_NO_REMAP
24

35
#include <libxml/uri.h>
46
#include "xml2_utils.h"

src/xml2_utils.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
#ifndef __XML2_XML_UTILS__
22
#define __XML2_XML_UTILS__
33

4+
#define R_NO_REMAP
45
#include <Rinternals.h>
6+
#undef R_NO_REMAP
7+
58
#include <libxml/tree.h>
69
#include <map>
710
#include <string>

src/xml2_xpath.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
#define R_NO_REMAP
12
#include <Rinternals.h>
3+
#undef R_NO_REMAP
4+
25
#include <libxml/xpath.h>
36
#include <libxml/xpathInternals.h>
47
#include <libxml/tree.h>
@@ -105,7 +108,7 @@ extern "C" SEXP xpath_search(SEXP node_sxp, SEXP doc_sxp, SEXP xpath_sxp, SEXP n
105108
XPtrNode node(node_sxp);
106109
XPtrDoc doc(doc_sxp);
107110
if (TYPEOF(xpath_sxp) != STRSXP) {
108-
Rf_error("XPath must be a string, received %s", type2char(TYPEOF(xpath_sxp)));
111+
Rf_error("XPath must be a string, received %s", Rf_type2char(TYPEOF(xpath_sxp)));
109112
}
110113
const char* xpath = CHAR(STRING_ELT(xpath_sxp, 0));
111114

0 commit comments

Comments
 (0)