add a missing check in xmlAddSibling, patch by Kris Breuker avoid
* tree.c: add a missing check in xmlAddSibling, patch by Kris Breuker
* xmlIO.c: avoid xmlAllocOutputBuffer using XML_BUFFER_EXACT which
leads to performances problems especially on Windows.
daniel
svn path=/trunk/; revision=3820
diff --git a/xmlIO.c b/xmlIO.c
index d4dc364..855bf41 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -2278,6 +2278,10 @@
return(NULL);
}
+ /* try to avoid a performance problem with Windows realloc() */
+ if (ret->buffer->alloc == XML_BUFFER_ALLOC_EXACT)
+ ret->buffer->alloc = XML_BUFFER_ALLOC_DOUBLEIT;
+
ret->encoder = encoder;
if (encoder != NULL) {
ret->conv = xmlBufferCreateSize(4000);