added xmlByteConsumed() interface updated the benchmark rebuilt the docs
* parserInternals.c xmlIO.c encoding.c include/libxml/parser.h
include/libxml/xmlIO.h: added xmlByteConsumed() interface
* doc/*: updated the benchmark rebuilt the docs
* python/tests/Makefile.am python/tests/indexes.py: added a
specific regression test for xmlByteConsumed()
* include/libxml/encoding.h rngparser.c tree.c: small cleanups
Daniel
diff --git a/tree.c b/tree.c
index 5a6c9df..8b8eedb 100644
--- a/tree.c
+++ b/tree.c
@@ -8320,7 +8320,6 @@
int * doc_txt_len, const char * txt_encoding,
int format) {
int dummy = 0;
-
xmlOutputBufferPtr out_buff = NULL;
xmlCharEncodingHandlerPtr conv_hdlr = NULL;
@@ -8349,13 +8348,13 @@
if (txt_encoding == NULL)
txt_encoding = (const char *) out_doc->encoding;
if (txt_encoding != NULL) {
- conv_hdlr = xmlFindCharEncodingHandler(txt_encoding);
- if ( conv_hdlr == NULL ) {
- xmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, (xmlNodePtr) out_doc,
- txt_encoding);
- return;
- }
- }
+ conv_hdlr = xmlFindCharEncodingHandler(txt_encoding);
+ if ( conv_hdlr == NULL ) {
+ xmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, (xmlNodePtr) out_doc,
+ txt_encoding);
+ return;
+ }
+ }
if ((out_buff = xmlAllocOutputBuffer(conv_hdlr)) == NULL ) {
xmlSaveErrMemory("creating buffer");