diff options
| author | Ben Straub <bs@github.com> | 2013-08-07 13:22:41 -0700 |
|---|---|---|
| committer | Ben Straub <bs@github.com> | 2013-08-07 13:22:41 -0700 |
| commit | 9c38f7a6523cdc87a897eccb6d83439987f99a4e (patch) | |
| tree | 50f451bef9e3c3a869e2f321d585ca929a6a13f6 /src/win32/dir.c | |
| parent | 75f98a95eee8a0efe8f9649ddc8a81c64d863ced (diff) | |
| download | libgit2-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/dir.c')
| -rw-r--r-- | src/win32/dir.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/win32/dir.c b/src/win32/dir.c index b18c603f7..a638fce96 100644 --- a/src/win32/dir.c +++ b/src/win32/dir.c @@ -26,7 +26,7 @@ static int init_filter(char *filter, size_t n, const char *dir) git__DIR *git__opendir(const char *dir) { char filter[GIT_WIN_PATH_UTF8]; - wchar_t filter_w[GIT_WIN_PATH_UTF16]; + git_win_str_utf16 filter_w; git__DIR *new = NULL; if (!dir || !init_filter(filter, sizeof(filter), dir)) @@ -40,7 +40,7 @@ git__DIR *git__opendir(const char *dir) if (!new->dir) goto fail; - git__utf8_to_16(filter_w, GIT_WIN_PATH_UTF16, filter); + git__utf8_to_16(filter_w, filter); new->h = FindFirstFileW(filter_w, &new->f); if (new->h == INVALID_HANDLE_VALUE) { @@ -102,7 +102,7 @@ struct git__dirent *git__readdir(git__DIR *d) void git__rewinddir(git__DIR *d) { char filter[GIT_WIN_PATH_UTF8]; - wchar_t filter_w[GIT_WIN_PATH_UTF16]; + git_win_str_utf16 filter_w; if (!d) return; @@ -116,7 +116,7 @@ void git__rewinddir(git__DIR *d) if (!init_filter(filter, sizeof(filter), d->dir)) return; - git__utf8_to_16(filter_w, GIT_WIN_PATH_UTF16, filter); + git__utf8_to_16(filter_w, filter); d->h = FindFirstFileW(filter_w, &d->f); if (d->h == INVALID_HANDLE_VALUE) |
