diff options
author | Riza Sulistyo <riza@teluu.com> | 2013-06-19 06:47:43 +0000 |
---|---|---|
committer | Riza Sulistyo <riza@teluu.com> | 2013-06-19 06:47:43 +0000 |
commit | d7aa4332dae06ae890053dd13239ddabee46b86c (patch) | |
tree | 34c599b317369bcc33827d5ee1200604a6599164 /pjlib/src/pj/unicode_win32.c | |
parent | 7949b9e53b97281cfa4526ffe5cf7c7d887b7025 (diff) |
Re #1680: Add initial support for Win64
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4537 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/unicode_win32.c')
-rw-r--r-- | pjlib/src/pj/unicode_win32.c | 11 |
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'; |