factoring of more error handling code, serious size reduction and more
* parser.c include/libxml/xmlerror.h: factoring of more
error handling code, serious size reduction and more lisibility
of the resulting code.
* parserInternals.c parser.c include/libxml/parserInternals.h
include/libxml/parser.h: changing the way VC:Proper Group/PE Nesting
checks are done, use a counter for entities. Entities where freed and
reallocated at the same address failing the check.
* tree.c: avoid a warning
* result/valid/* result/VC/*: this slightly changes some validation
error messages.
Daniel
diff --git a/parserInternals.c b/parserInternals.c
index dc06bb1..7c9e471 100644
--- a/parserInternals.c
+++ b/parserInternals.c
@@ -1973,6 +1973,7 @@
xmlParserInputPtr
xmlNewInputStream(xmlParserCtxtPtr ctxt) {
xmlParserInputPtr input;
+ static int id = 0;
input = (xmlParserInputPtr) xmlMalloc(sizeof(xmlParserInput));
if (input == NULL) {
@@ -1989,6 +1990,11 @@
input->line = 1;
input->col = 1;
input->standalone = -1;
+ /*
+ * we don't care about thread reentrancy unicity for a single
+ * parser context (and hence thread) is sufficient.
+ */
+ input->id = id++;
return(input);
}