dohh I really didn't intended to commit this test version :-( Daniel
* HTMLparser.c error.c parser.c parserInternals.c tree.c xmlIO.c
include/libxml/tree.h: dohh I really didn't intended to commit
this test version :-(
Daniel
diff --git a/tree.c b/tree.c
index bbae85b..0d36ca9 100644
--- a/tree.c
+++ b/tree.c
@@ -5159,8 +5159,6 @@
void
xmlBufferSetAllocationScheme(xmlBufferPtr buf,
xmlBufferAllocationScheme scheme) {
- if (buf->alloc == XML_BUFFER_ALLOC_UNMUTABLE)
- return;
if (buf == NULL) {
#ifdef DEBUG_BUFFER
xmlGenericError(xmlGenericErrorContext,
@@ -5188,8 +5186,7 @@
#endif
return;
}
- if ((buf->content != NULL) &&
- (buf->alloc != XML_BUFFER_ALLOC_UNMUTABLE)) {
+ if (buf->content != NULL) {
xmlFree(buf->content);
}
xmlFree(buf);
@@ -5203,9 +5200,6 @@
*/
void
xmlBufferEmpty(xmlBufferPtr buf) {
- if (buf->alloc == XML_BUFFER_ALLOC_UNMUTABLE)
- return;
-
if (buf->content == NULL) return;
buf->use = 0;
memset(buf->content, 0, buf->size);
@@ -5225,12 +5219,6 @@
if (len == 0) return(0);
if (len > buf->use) return(-1);
- if (buf->alloc == XML_BUFFER_ALLOC_UNMUTABLE) {
- buf->content = &buf->content[len];
- buf->use -= len;
- return(len);
- }
-
buf->use -= len;
memmove(buf->content, &buf->content[len], buf->use * sizeof(xmlChar));
@@ -5252,9 +5240,6 @@
int size;
xmlChar *newbuf;
- if (buf->alloc == XML_BUFFER_ALLOC_UNMUTABLE)
- return(-1);
-
if (len + buf->use < buf->size) return(0);
size = buf->use + len + 100;
@@ -5349,9 +5334,6 @@
unsigned int newSize;
xmlChar* rebuf = NULL;
- if (buf->alloc == XML_BUFFER_ALLOC_UNMUTABLE)
- return 0;
-
/*take care of empty case*/
newSize = (buf->size ? buf->size*2 : size);
@@ -5401,9 +5383,6 @@
xmlBufferAdd(xmlBufferPtr buf, const xmlChar *str, int len) {
unsigned int needSize;
- if (buf->alloc == XML_BUFFER_ALLOC_UNMUTABLE)
- return;
-
if (str == NULL) {
#ifdef DEBUG_BUFFER
xmlGenericError(xmlGenericErrorContext,
@@ -5452,9 +5431,6 @@
xmlBufferAddHead(xmlBufferPtr buf, const xmlChar *str, int len) {
unsigned int needSize;
- if (buf->alloc == XML_BUFFER_ALLOC_UNMUTABLE)
- return;
-
if (str == NULL) {
#ifdef DEBUG_BUFFER
xmlGenericError(xmlGenericErrorContext,
@@ -5515,9 +5491,6 @@
xmlBufferCCat(xmlBufferPtr buf, const char *str) {
const char *cur;
- if (buf->alloc == XML_BUFFER_ALLOC_UNMUTABLE)
- return;
-
if (str == NULL) {
#ifdef DEBUG_BUFFER
xmlGenericError(xmlGenericErrorContext,
@@ -5590,9 +5563,6 @@
*/
void
xmlBufferWriteQuotedString(xmlBufferPtr buf, const xmlChar *string) {
- if (buf->alloc == XML_BUFFER_ALLOC_UNMUTABLE)
- return;
-
if (xmlStrchr(string, '"')) {
if (xmlStrchr(string, '\'')) {
#ifdef DEBUG_BUFFER