[winpr,crt] add return to ByteSwapUnicode
This commit is contained in:
parent
67f4dcabdc
commit
30494d0c93
@ -404,7 +404,7 @@ extern "C"
|
||||
LPBOOL lpUsedDefaultChar));
|
||||
#endif
|
||||
|
||||
WINPR_API void ByteSwapUnicode(WCHAR* wstr, size_t length);
|
||||
WINPR_API const WCHAR* ByteSwapUnicode(WCHAR* wstr, size_t length);
|
||||
|
||||
WINPR_API size_t ConvertLineEndingToLF(char* str, size_t size);
|
||||
WINPR_API char* ConvertLineEndingToCRLF(const char* str, size_t* size);
|
||||
|
@ -363,12 +363,13 @@ int ConvertFromUnicode(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int
|
||||
* Swap Unicode byte order (UTF16LE <-> UTF16BE)
|
||||
*/
|
||||
|
||||
void ByteSwapUnicode(WCHAR* wstr, size_t length)
|
||||
const WCHAR* ByteSwapUnicode(WCHAR* wstr, size_t length)
|
||||
{
|
||||
WINPR_ASSERT(wstr || (length == 0));
|
||||
|
||||
for (size_t x = 0; x < length; x++)
|
||||
wstr[x] = _byteswap_ushort(wstr[x]);
|
||||
return wstr;
|
||||
}
|
||||
|
||||
SSIZE_T ConvertWCharToUtf8(const WCHAR* wstr, char* str, size_t len)
|
||||
|
Loading…
Reference in New Issue
Block a user