1*03514f19SPatrick WilliamsFrom f7a5ebc3a673b246a64c9a664df304c1520a3951 Mon Sep 17 00:00:00 2001
2*03514f19SPatrick WilliamsFrom: Khem Raj <raj.khem@gmail.com>
3*03514f19SPatrick WilliamsDate: Thu, 7 Mar 2024 12:35:17 -0800
4*03514f19SPatrick WilliamsSubject: [PATCH] Make xmlError struct constant
5*03514f19SPatrick Williams
6*03514f19SPatrick WilliamsIn libxml2 commit v2.12.0~14 the API changed so that
7*03514f19SPatrick WilliamsxmlGetLastError() returns pointer to a constant xmlError struct.
8*03514f19SPatrick WilliamsReflect this change in our code.
9*03514f19SPatrick Williams
10*03514f19SPatrick WilliamsUpstream-Status: Pending
11*03514f19SPatrick WilliamsSigned-off-by: Khem Raj <raj.khem@gmail.com>
12*03514f19SPatrick Williams---
13*03514f19SPatrick Williams src/xml.c     | 2 +-
14*03514f19SPatrick Williams src/xmlstar.h | 2 +-
15*03514f19SPatrick Williams 2 files changed, 2 insertions(+), 2 deletions(-)
16*03514f19SPatrick Williams
17*03514f19SPatrick Williamsdiff --git a/src/xml.c b/src/xml.c
18*03514f19SPatrick Williamsindex cf47cc2..e6f19c1 100644
19*03514f19SPatrick Williams--- a/src/xml.c
20*03514f19SPatrick Williams+++ b/src/xml.c
21*03514f19SPatrick Williams@@ -104,7 +104,7 @@ void reportGenericError(void* ctx, const char * msg, ...) {
22*03514f19SPatrick Williams /* by default all errors are reported */
23*03514f19SPatrick Williams static ErrorInfo errorInfo = { NULL, NULL, VERBOSE, CONTINUE };
24*03514f19SPatrick Williams
25*03514f19SPatrick Williams-void reportError(void *ptr, xmlErrorPtr error)
26*03514f19SPatrick Williams+void reportError(void *ptr, const xmlError *error)
27*03514f19SPatrick Williams {
28*03514f19SPatrick Williams     ErrorInfo *errorInfo = (ErrorInfo*) ptr;
29*03514f19SPatrick Williams     assert(errorInfo);
30*03514f19SPatrick Williamsdiff --git a/src/xmlstar.h b/src/xmlstar.h
31*03514f19SPatrick Williamsindex 3e1eed3..7e41ac4 100644
32*03514f19SPatrick Williams--- a/src/xmlstar.h
33*03514f19SPatrick Williams+++ b/src/xmlstar.h
34*03514f19SPatrick Williams@@ -32,7 +32,7 @@ typedef struct _errorInfo {
35*03514f19SPatrick Williams     ErrorStop stop;
36*03514f19SPatrick Williams } ErrorInfo;
37*03514f19SPatrick Williams
38*03514f19SPatrick Williams-void reportError(void *ptr, xmlErrorPtr error);
39*03514f19SPatrick Williams+void reportError(void *ptr, const xmlError* error);
40*03514f19SPatrick Williams void suppressErrors(void);
41*03514f19SPatrick Williams
42*03514f19SPatrick Williams typedef struct _gOptions {
43*03514f19SPatrick Williams--
44*03514f19SPatrick Williams2.44.0
45*03514f19SPatrick Williams
46