Michael Karcher : msxml3: Remove superflous re-conversion from wide chars to utf8.
Alexandre Julliard
julliard at winehq.org
Mon Oct 13 06:38:59 CDT 2008
Module: wine
Branch: master
Commit: 0803167ff0b3fc0f6f26a3a20d5987099cfd6fb3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0803167ff0b3fc0f6f26a3a20d5987099cfd6fb3
Author: Michael Karcher <wine at mkarcher.dialup.fu-berlin.de>
Date: Sat Oct 11 23:58:27 2008 +0200
msxml3: Remove superflous re-conversion from wide chars to utf8.
---
dlls/msxml3/comment.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/dlls/msxml3/comment.c b/dlls/msxml3/comment.c
index 1870b3b..ec6355f 100644
--- a/dlls/msxml3/comment.c
+++ b/dlls/msxml3/comment.c
@@ -601,25 +601,17 @@ static HRESULT WINAPI domcomment_appendData(
/* Older versions of libxml < 2.6.27 didn't correctly support
xmlTextConcat on Comment nodes. Fallback to setting the
contents directly if xmlTextConcat fails.
-
- NOTE: if xmlTextConcat fails, pContent is destroyed.
*/
if(xmlTextConcat(pDOMNode->node, pContent, SysStringLen(p) ) == 0)
hr = S_OK;
else
{
xmlChar *pNew;
- pContent = xmlChar_from_wchar( (WCHAR*)p );
- if(pContent)
+ pNew = xmlStrcat(xmlNodeGetContent(pDOMNode->node), pContent);
+ if(pNew)
{
- pNew = xmlStrcat(xmlNodeGetContent(pDOMNode->node), pContent);
- if(pNew)
- {
- xmlNodeSetContent(pDOMNode->node, pNew);
- hr = S_OK;
- }
- else
- hr = E_FAIL;
+ xmlNodeSetContent(pDOMNode->node, pNew);
+ hr = S_OK;
}
else
hr = E_FAIL;
More information about the wine-cvs
mailing list