diff --git a/error.c b/error.c index 1b4fe767..c87cf2aa 100644 --- a/error.c +++ b/error.c @@ -939,7 +939,7 @@ xmlResetLastError(void) * * 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 2d3651ec..2dd792ac 100644 --- a/include/libxml/xmlerror.h +++ b/include/libxml/xmlerror.h @@ -856,7 +856,7 @@ typedef void (*xmlGenericErrorFunc) (void *ctx, * 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 @@ XMLPUBFUN const xmlError * 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 209dc77d..fe896b72 100644 --- a/runtest.c +++ b/runtest.c @@ -359,7 +359,7 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input , } 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 b871b694..3053f6a3 100644 --- a/runxmlconf.c +++ b/runxmlconf.c @@ -121,7 +121,7 @@ static void test_log(const char *msg, ...) { } 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 7337b34e..b780e230 100644 --- a/testapi.c +++ b/testapi.c @@ -39,7 +39,7 @@ static xmlNsPtr api_ns = NULL; 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 114be25c..8895d8d0 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 de0da9d4..78d62fb0 100644 --- a/testlimits.c +++ b/testlimits.c @@ -475,7 +475,7 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input , } 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 01e15b2c..c5832905 100644 --- a/testrecurse.c +++ b/testrecurse.c @@ -444,7 +444,7 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input , } 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 c04cb113..5c37738e 100644 --- a/xmlreader.c +++ b/xmlreader.c @@ -3973,10 +3973,10 @@ xmlTextReaderValidityWarningRelay(void *ctx, const char *msg, ...) } 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 @@ xmlTextReaderGenericError(void *ctxt, xmlParserSeverities severity, } static void -xmlTextReaderStructuredError(void *ctxt, xmlErrorPtr error) +xmlTextReaderStructuredError(void *ctxt, const xmlError *error) { xmlParserCtxtPtr ctx = (xmlParserCtxtPtr) ctxt;