mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-21 22:50:08 +03:00
error: Make more xmlError structs constant
Prepare for future changes, see 45470611.
This commit is contained in:
parent
6f78efb0fa
commit
61034116d0
2
error.c
2
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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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++;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user