Skip to content

Commit e53842b

Browse files
committed
TextReader: xmlStructuredErrorFunc() changed in libxml2 2.12.0
Before 2.12.0: typedef void (*xmlStructuredErrorFunc) (void *userData, xmlError *error); Since 2.12.0: typedef void (*xmlStructuredErrorFunc) (void *userData, const xmlError *error); * libxml++/parsers/textreader.cc: The declaration of c_callback_error() must fit the libxml2 version being compiled with. As it's a function with C linkage, its name is not mangled. It's not an ABI break.
1 parent a4b335e commit e53842b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libxml++/parsers/textreader.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <libxml++/document.h>
66

77
#include <libxml/xmlreader.h>
8+
#include <libxml/xmlversion.h>
89

910
namespace
1011
{
@@ -16,7 +17,11 @@ ErrorFuncType p_callback_error;
1617

1718
extern "C"
1819
{
20+
#if LIBXML_VERSION >= 21200
1921
static void c_callback_error(void* userData, const xmlError* error)
22+
#else
23+
static void c_callback_error(void* userData, xmlError* error)
24+
#endif
2025
{
2126
const xmlpp::ustring msg = xmlpp::format_xml_error(error);
2227

0 commit comments

Comments
 (0)