adding an serror field to the validation context breaks the ABI for the
* valid.c include/libxml/valid.h: adding an serror field to
the validation context breaks the ABI for the xmlParserCtxt
structure since it's embedded by content and not by reference
Daniel
diff --git a/ChangeLog b/ChangeLog
index 507e204..c4f9a84 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sat Oct 11 13:24:57 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c include/libxml/valid.h: adding an serror field to
+ the validation context breaks the ABI for the xmlParserCtxt
+ structure since it's embedded by content and not by reference
+
Sat Oct 11 12:46:49 CEST 2003 Daniel Veillard <daniel@veillard.com>
* configure.in: patch from Mike Hommey
diff --git a/include/libxml/valid.h b/include/libxml/valid.h
index 07b4f8f..cfef83f 100644
--- a/include/libxml/valid.h
+++ b/include/libxml/valid.h
@@ -87,8 +87,6 @@
void *am;
void *state;
#endif
-
- xmlStructuredErrorFunc serror; /* structured error reporting capability */
};
/*
diff --git a/valid.c b/valid.c
index bec4f9a..390195e 100644
--- a/valid.c
+++ b/valid.c
@@ -53,7 +53,6 @@
static void
xmlVErrMemory(xmlValidCtxtPtr ctxt, const char *extra)
{
- xmlStructuredErrorFunc schannel = NULL;
xmlGenericErrorFunc channel = NULL;
xmlParserCtxtPtr pctxt = NULL;
void *data = NULL;
@@ -62,15 +61,14 @@
channel = ctxt->error;
data = ctxt->userData;
pctxt = ctxt->userData;
- schannel = ctxt->serror;
}
if (extra)
- __xmlRaiseError(schannel, channel, data,
+ __xmlRaiseError(NULL, channel, data,
pctxt, NULL, XML_FROM_DTD, XML_ERR_NO_MEMORY,
XML_ERR_FATAL, NULL, 0, extra, NULL, NULL, 0, 0,
"Memory allocation failed : %s\n", extra);
else
- __xmlRaiseError(schannel, channel, data,
+ __xmlRaiseError(NULL, channel, data,
pctxt, NULL, XML_FROM_DTD, XML_ERR_NO_MEMORY,
XML_ERR_FATAL, NULL, 0, NULL, NULL, NULL, 0, 0,
"Memory allocation failed\n");
@@ -88,24 +86,22 @@
xmlErrValid(xmlValidCtxtPtr ctxt ATTRIBUTE_UNUSED, xmlParserErrors error,
const char *msg, const char *extra)
{
- xmlStructuredErrorFunc schannel = NULL;
xmlGenericErrorFunc channel = NULL;
xmlParserCtxtPtr pctxt = NULL;
void *data = NULL;
if (ctxt != NULL) {
channel = ctxt->error;
- schannel = ctxt->serror;
data = ctxt->userData;
pctxt = ctxt->userData;
}
if (extra)
- __xmlRaiseError(schannel, channel, data,
+ __xmlRaiseError(NULL, channel, data,
pctxt, NULL, XML_FROM_DTD, error,
XML_ERR_ERROR, NULL, 0, extra, NULL, NULL, 0, 0,
msg, extra);
else
- __xmlRaiseError(schannel, channel, data,
+ __xmlRaiseError(NULL, channel, data,
pctxt, NULL, XML_FROM_DTD, error,
XML_ERR_ERROR, NULL, 0, NULL, NULL, NULL, 0, 0,
msg);