error: Make more xmlError structs constant

Prepare for future changes, see 45470611.
diff --git a/error.c b/error.c
index 1b4fe76..c87cf2a 100644
--- a/error.c
+++ b/error.c
@@ -939,7 +939,7 @@
  *
  * Returns NULL if no error occurred or a pointer to the error
  */
-xmlErrorPtr
+const xmlError *
 xmlCtxtGetLastError(void *ctx)
 {
     xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h
index 2d3651e..2dd792a 100644
--- a/include/libxml/xmlerror.h
+++ b/include/libxml/xmlerror.h
@@ -856,7 +856,7 @@
  * Signature of the function to use when there is an error and
  * the module handles the new error reporting mechanism.
  */
-typedef void (*xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);
+typedef void (*xmlStructuredErrorFunc) (void *userData, const xmlError *error);
 
 /** DOC_DISABLE */
 #define XML_GLOBALS_ERROR \
@@ -932,7 +932,7 @@
     xmlGetLastError		(void);
 XMLPUBFUN void
     xmlResetLastError		(void);
-XMLPUBFUN xmlErrorPtr
+XMLPUBFUN const xmlError *
     xmlCtxtGetLastError		(void *ctx);
 XMLPUBFUN void
     xmlCtxtResetLastError	(void *ctx);
diff --git a/runtest.c b/runtest.c
index 209dc77..fe896b7 100644
--- a/runtest.c
+++ b/runtest.c
@@ -359,7 +359,7 @@
 }
 
 static void
-testStructuredErrorHandler(void *ctx  ATTRIBUTE_UNUSED, xmlErrorPtr err) {
+testStructuredErrorHandler(void *ctx ATTRIBUTE_UNUSED, const xmlError *err) {
     char *file = NULL;
     int line = 0;
     int code = -1;
diff --git a/runxmlconf.c b/runxmlconf.c
index b871b69..3053f6a 100644
--- a/runxmlconf.c
+++ b/runxmlconf.c
@@ -121,7 +121,7 @@
 }
 
 static void
-testErrorHandler(void *userData ATTRIBUTE_UNUSED, xmlErrorPtr error) {
+testErrorHandler(void *userData ATTRIBUTE_UNUSED, const xmlError *error) {
     int res;
 
     if (testErrorsSize >= 32768)
diff --git a/testapi.c b/testapi.c
index 7337b34..b780e23 100644
--- a/testapi.c
+++ b/testapi.c
@@ -39,7 +39,7 @@
 
 static void
 structured_errors(void *userData ATTRIBUTE_UNUSED,
-                  xmlErrorPtr error ATTRIBUTE_UNUSED) {
+                  const xmlError *error ATTRIBUTE_UNUSED) {
     generic_errors++;
 }
 
diff --git a/testchar.c b/testchar.c
index 114be25..8895d8d 100644
--- a/testchar.c
+++ b/testchar.c
@@ -15,7 +15,7 @@
 
 int lastError;
 
-static void errorHandler(void *unused, xmlErrorPtr err) {
+static void errorHandler(void *unused, const xmlError *err) {
     if ((unused == NULL) && (err != NULL) && (lastError == 0)) {
         lastError = err->code;
     }
diff --git a/testlimits.c b/testlimits.c
index de0da9d..78d62fb 100644
--- a/testlimits.c
+++ b/testlimits.c
@@ -475,7 +475,7 @@
 }
 
 static void
-testStructuredErrorHandler(void *ctx  ATTRIBUTE_UNUSED, xmlErrorPtr err) {
+testStructuredErrorHandler(void *ctx ATTRIBUTE_UNUSED, const xmlError *err) {
     char *file = NULL;
     int line = 0;
     int code = -1;
diff --git a/testrecurse.c b/testrecurse.c
index 01e15b2..c583290 100644
--- a/testrecurse.c
+++ b/testrecurse.c
@@ -444,7 +444,7 @@
 }
 
 static void
-testStructuredErrorHandler(void *ctx  ATTRIBUTE_UNUSED, xmlErrorPtr err) {
+testStructuredErrorHandler(void *ctx ATTRIBUTE_UNUSED, const xmlError *err) {
     char *file = NULL;
     int line = 0;
     int code = -1;
diff --git a/xmlreader.c b/xmlreader.c
index c04cb11..5c37738 100644
--- a/xmlreader.c
+++ b/xmlreader.c
@@ -3973,10 +3973,10 @@
 }
 
 static void
-  xmlTextReaderStructuredError(void *ctxt, xmlErrorPtr error);
+xmlTextReaderStructuredError(void *ctxt, const xmlError *error);
 
 static void
-xmlTextReaderValidityStructuredRelay(void *userData, xmlErrorPtr error)
+xmlTextReaderValidityStructuredRelay(void *userData, const xmlError *error)
 {
     xmlTextReaderPtr reader = (xmlTextReaderPtr) userData;
 
@@ -4707,7 +4707,7 @@
 }
 
 static void
-xmlTextReaderStructuredError(void *ctxt, xmlErrorPtr error)
+xmlTextReaderStructuredError(void *ctxt, const xmlError *error)
 {
     xmlParserCtxtPtr ctx = (xmlParserCtxtPtr) ctxt;