msxml3: Fix a warning accessing internal buffer of xmlOutputBuffer

Nikolay Sivov bunglehead at gmail.com
Wed Aug 21 07:19:45 CDT 2013


Fix a warning accessing internal buffer of xmlOutputBuffer
-------------- next part --------------
>From 34ab7ca10d00e819f3d9facb74d57c4828dbaa3d Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov at codeweavers.com>
Date: Wed, 21 Aug 2013 16:11:05 +0400
Subject: [PATCH 7/7] Fix a warning accessing internal buffer of
 xmlOutputBuffer

---
 dlls/msxml3/node.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c
index a196f4e..4c03571 100644
--- a/dlls/msxml3/node.c
+++ b/dlls/msxml3/node.c
@@ -987,6 +987,15 @@ static void htmldoc_dumpcontent(xmlOutputBufferPtr buf, xmlDocPtr doc)
     doc->type = type;
 }
 
+static const xmlChar *get_output_buffer_content(xmlOutputBufferPtr output)
+{
+#ifdef LIBXML2_NEW_BUFFER
+    return xmlOutputBufferGetContent(output);
+#else
+    return xmlBufferContent(output->buffer);
+#endif
+}
+
 HRESULT node_transform_node(const xmlnode *This, IXMLDOMNode *stylesheet, BSTR *p)
 {
 #ifdef SONAME_LIBXSLT
@@ -1015,7 +1024,7 @@ HRESULT node_transform_node(const xmlnode *This, IXMLDOMNode *stylesheet, BSTR *
                 if (output)
                 {
                     htmldoc_dumpcontent(output, result->doc);
-                    content = xmlBufferContent(output->buffer);
+                    content = get_output_buffer_content(output);
                     *p = bstr_from_xmlChar(content);
                     xmlOutputBufferClose(output);
                 }
-- 
1.7.10.4



More information about the wine-patches mailing list