Jefferson Carpenter : msxml3: Fold in reset_output_buffer.
Alexandre Julliard
julliard at winehq.org
Tue Feb 2 15:52:10 CST 2021
Module: wine
Branch: master
Commit: 433b9081ba7c862feb947400f507228e793d7d4c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=433b9081ba7c862feb947400f507228e793d7d4c
Author: Jefferson Carpenter <jeffersoncarpenter2 at gmail.com>
Date: Tue Feb 2 19:01:10 2021 +0000
msxml3: Fold in reset_output_buffer.
Signed-off-by: Jefferson Carpenter <jeffersoncarpenter2 at gmail.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msxml3/mxwriter.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/dlls/msxml3/mxwriter.c b/dlls/msxml3/mxwriter.c
index 029e9aac0d0..ac3c0fa59c3 100644
--- a/dlls/msxml3/mxwriter.c
+++ b/dlls/msxml3/mxwriter.c
@@ -693,14 +693,6 @@ static inline HRESULT flush_output_buffer(mxwriter *This)
return write_data_to_stream(This);
}
-/* Resets the mxwriter's output buffer by closing it, then creating a new
- * output buffer using the given encoding.
- */
-static inline void reset_output_buffer(mxwriter *This)
-{
- close_output_buffer(This);
-}
-
static HRESULT writer_set_property(mxwriter *writer, mxwriter_prop property, VARIANT_BOOL value)
{
writer->props[property] = value;
@@ -927,7 +919,7 @@ static HRESULT WINAPI mxwriter_put_output(IMXWriter *iface, VARIANT dest)
{
if (This->dest) IStream_Release(This->dest);
This->dest = NULL;
- reset_output_buffer(This);
+ close_output_buffer(This);
break;
}
case VT_UNKNOWN:
@@ -938,7 +930,7 @@ static HRESULT WINAPI mxwriter_put_output(IMXWriter *iface, VARIANT dest)
if (hr == S_OK)
{
/* Recreate the output buffer to make sure it's using the correct encoding. */
- reset_output_buffer(This);
+ close_output_buffer(This);
if (This->dest) IStream_Release(This->dest);
This->dest = stream;
@@ -1028,7 +1020,7 @@ static HRESULT WINAPI mxwriter_put_encoding(IMXWriter *iface, BSTR encoding)
This->xml_enc = enc;
TRACE("got encoding %d\n", This->xml_enc);
- reset_output_buffer(This);
+ close_output_buffer(This);
return S_OK;
}
@@ -1229,7 +1221,7 @@ static HRESULT WINAPI SAXContentHandler_startDocument(ISAXContentHandler *iface)
* be how Windows works.
*/
if (This->prop_changed) {
- reset_output_buffer(This);
+ close_output_buffer(This);
This->prop_changed = FALSE;
}
More information about the wine-cvs
mailing list