summaryrefslogtreecommitdiff
path: root/src/win32/utf-conv.c
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2013-08-07 13:22:41 -0700
committerBen Straub <bs@github.com>2013-08-07 13:22:41 -0700
commit9c38f7a6523cdc87a897eccb6d83439987f99a4e (patch)
tree50f451bef9e3c3a869e2f321d585ca929a6a13f6 /src/win32/utf-conv.c
parent75f98a95eee8a0efe8f9649ddc8a81c64d863ced (diff)
downloadlibgit2-9c38f7a6523cdc87a897eccb6d83439987f99a4e.tar.gz
Add typedefs for win32 utf-8 and utf-16 buffers
...and normalize the signatures of the two conversion functions.
Diffstat (limited to 'src/win32/utf-conv.c')
-rw-r--r--src/win32/utf-conv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/win32/utf-conv.c b/src/win32/utf-conv.c
index 78d277494..9c9686147 100644
--- a/src/win32/utf-conv.c
+++ b/src/win32/utf-conv.c
@@ -70,12 +70,12 @@ void git__utf8_to_16(wchar_t *dest, size_t length, const char *src)
}
#endif
-int git__utf8_to_16(wchar_t *dest, size_t length, const char *src)
+int git__utf8_to_16(git_win_str_utf16 dest, const git_win_str_utf8 src)
{
- return MultiByteToWideChar(CP_UTF8, 0, src, -1, dest, (int)length);
+ return MultiByteToWideChar(CP_UTF8, 0, src, -1, dest, GIT_WIN_PATH_UTF16);
}
-int git__utf16_to_8(char *out, const wchar_t *input)
+int git__utf16_to_8(git_win_str_utf8 dest, const git_win_str_utf16 src)
{
- return WideCharToMultiByte(CP_UTF8, 0, input, -1, out, GIT_WIN_PATH_UTF8, NULL, NULL);
+ return WideCharToMultiByte(CP_UTF8, 0, src, -1, dest, GIT_WIN_PATH_UTF8, NULL, NULL);
}