diff options
author | Mike Hommey <glandium@debian.org> | 2009-03-01 10:54:34 +0100 |
---|---|---|
committer | Mike Hommey <glandium@debian.org> | 2009-03-01 10:54:34 +0100 |
commit | 0c1d871e4c5e46a2945cccb2ce765f9be2fe01fb (patch) | |
tree | 982382b30eb118c65e1a06b25757dac5c3c69b8d /tree.c | |
parent | d03a853bb0370d89552eceee59df1746da4a37f8 (diff) | |
download | libxml2-upstream/2.7.1.dfsg.tar.gz |
Import upstream version 2.7.1upstream/2.7.1.dfsg
Diffstat (limited to 'tree.c')
-rw-r--r-- | tree.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -680,7 +680,9 @@ try_complex: */ void xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme) { - xmlBufferAllocScheme = scheme; + if ((scheme == XML_BUFFER_ALLOC_EXACT) || + (scheme == XML_BUFFER_ALLOC_DOUBLEIT)) + xmlBufferAllocScheme = scheme; } /** @@ -6736,9 +6738,12 @@ xmlBufferSetAllocationScheme(xmlBufferPtr buf, #endif return; } - if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return; - - buf->alloc = scheme; + if ((buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) || + (buf->alloc == XML_BUFFER_ALLOC_IO)) return; + if ((scheme == XML_BUFFER_ALLOC_DOUBLEIT) || + (scheme == XML_BUFFER_ALLOC_EXACT) || + (scheme == XML_BUFFER_ALLOC_IMMUTABLE)) + buf->alloc = scheme; } /** |