mirror of
https://git.freebsd.org/ports.git
synced 2025-06-02 19:36:28 -04:00
Version 2.12 of libxml2 introduced a backwards incompatible change in the signature of some functions, notably the second argument to xmlStructuredErrorFunc has gained a const qualifier, changing from `xmlError *error` to `const xmlError *error`. To make the signatures compatible with both pre- and post-2.12, I have introduced a check on LIBXML_VERSION. PR: 279968 Reported by: dizzy
19 lines
476 B
C
19 lines
476 B
C
--- docObj.c.orig 2013-03-30 17:17:07 UTC
|
|
+++ docObj.c
|
|
@@ -1852,9 +1852,13 @@ void
|
|
}
|
|
|
|
void
|
|
-TclXML_libxml2_ErrorHandler (ctx, error)
|
|
- void *ctx; /* ignore - depends on context */
|
|
- xmlErrorPtr error;
|
|
+TclXML_libxml2_ErrorHandler (void *ctx,
|
|
+#if LIBXML_VERSION >= 21200
|
|
+ const xmlError *error
|
|
+#else
|
|
+ xmlError *error
|
|
+#endif
|
|
+ )
|
|
{
|
|
ThreadSpecificData *tsdPtr = Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
|
|
Tcl_Obj *objPtr;
|