summaryrefslogtreecommitdiff
path: root/pjlib/src/pj/unicode_win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'pjlib/src/pj/unicode_win32.c')
-rw-r--r--pjlib/src/pj/unicode_win32.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/pjlib/src/pj/unicode_win32.c b/pjlib/src/pj/unicode_win32.c
index 999a0404..7718f65b 100644
--- a/pjlib/src/pj/unicode_win32.c
+++ b/pjlib/src/pj/unicode_win32.c
@@ -23,8 +23,8 @@
#include <windows.h>
-PJ_DEF(wchar_t*) pj_ansi_to_unicode(const char *s, pj_size_t len,
- wchar_t *buf, pj_size_t buf_count)
+PJ_DEF(wchar_t*) pj_ansi_to_unicode(const char *s, int len,
+ wchar_t *buf, int buf_count)
{
PJ_ASSERT_RETURN(s && buf, NULL);
@@ -41,12 +41,13 @@ PJ_DEF(wchar_t*) pj_ansi_to_unicode(const char *s, pj_size_t len,
}
-PJ_DEF(char*) pj_unicode_to_ansi( const wchar_t *wstr, pj_size_t len,
- char *buf, pj_size_t buf_size)
+PJ_DEF(char*) pj_unicode_to_ansi( const wchar_t *wstr, pj_ssize_t len,
+ char *buf, int buf_size)
{
PJ_ASSERT_RETURN(wstr && buf, NULL);
- len = WideCharToMultiByte(CP_ACP, 0, wstr, len, buf, buf_size, NULL, NULL);
+ len = WideCharToMultiByte(CP_ACP, 0, wstr, (int)len, buf, buf_size,
+ NULL, NULL);
if (buf_size) {
if (len < buf_size)
buf[len] = '\0';