oleaut32: Do not use wide character constants.

Michael Stefaniuc mstefani at redhat.de
Thu Jun 21 15:57:21 CDT 2007


They aren't needed and the implicit cast from the 32bit wchar_t to the
16bit WCHAR isn't that much better than the (Wine) normal implicit cast
from the 8bit char.
---
 dlls/oleaut32/oleaut.c  |    2 +-
 dlls/oleaut32/typelib.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c
index 6778af1..202db67 100644
--- a/dlls/oleaut32/oleaut.c
+++ b/dlls/oleaut32/oleaut.c
@@ -266,7 +266,7 @@ BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
      * string.
      */
     stringBuffer = (WCHAR*)newBuffer;
-    stringBuffer[len] = L'\0';
+    stringBuffer[len] = '\0';
 
     return (LPWSTR)stringBuffer;
 }
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 1558593..5a6fc16 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -1636,7 +1636,7 @@ static void MSFT_ReadValue( VARIANT * pVar, int offset, TLBContext *pcx )
             MSFT_Read(ptr, size, pcx, DO_NOT_SEEK);/* read string (ANSI) */
             V_BSTR(pVar)=SysAllocStringLen(NULL,size);
             /* FIXME: do we need a AtoW conversion here? */
-            V_UNION(pVar, bstrVal[size])=L'\0';
+            V_UNION(pVar, bstrVal[size])='\0';
             while(size--) V_UNION(pVar, bstrVal[size])=ptr[size];
             TLB_Free(ptr);
 	}
-- 
1.5.0.6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070621/3a0d16f1/attachment.pgp


More information about the wine-patches mailing list