1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
Fix with libxml2-2.14
https://sourceforge.net/p/xml-copy-editor/bugs/242/
--- src/wraplibxml.cpp.orig 2025-05-15 17:09:04 UTC
+++ src/wraplibxml.cpp
@@ -54,7 +54,11 @@ class Initializer (public)
xmlLoadCatalog ( CONV ( catalogPath ) );
::catalog = xmlLoadACatalog ( CONV ( catalogPath ) );
+#if LIBXML_VERSION < 21400
initGenericErrorDefaultFunc ( NULL );
+#else
+ xmlSetGenericErrorFunc ( NULL, NULL );
+#endif
}
~Initializer ()
@@ -472,7 +476,7 @@ std::string WrapLibxml::dumpXPathObject ( xmlXPathObje
case XPATH_STRING:
sstream << obj->stringval;
break;
-
+#if LIBXML_VERSION < 21400
case XPATH_POINT:
xmlBufferPtr bufferPtr;
bufferPtr = xmlBufferCreate();
@@ -486,6 +490,7 @@ std::string WrapLibxml::dumpXPathObject ( xmlXPathObje
case XPATH_RANGE:
case XPATH_LOCATIONSET:
+#endif
case XPATH_XSLT_TREE:
default:
FILE *fp = tmpfile();
@@ -706,7 +711,7 @@ wxString WrapLibxml::getLastError()
wxString WrapLibxml::getLastError()
{
- xmlErrorPtr err = xmlGetLastError();
+ const xmlError *err = xmlGetLastError();
if ( !err )
return nonParserError;
@@ -722,7 +727,7 @@ std::pair<int, int> WrapLibxml::getErrorPosition()
std::pair<int, int> WrapLibxml::getErrorPosition()
{
- xmlErrorPtr err = xmlGetLastError();
+ const xmlError *err = xmlGetLastError();
if ( !err )
return std::make_pair ( 1, 1 );
|