diff options
| author | Russell Belfer <arrbee@arrbee.com> | 2011-12-28 23:28:50 -0800 |
|---|---|---|
| committer | Russell Belfer <arrbee@arrbee.com> | 2011-12-29 00:01:10 -0800 |
| commit | 73b51450a3194ddaa2ac180a1fea25fdf66971bb (patch) | |
| tree | 4a6f4f0cfc90ded7f7734da2b6a9353d9bb0890b /src/win32/utf-conv.c | |
| parent | ee1f0b1aed7798908d9e038b006b66f868613fc3 (diff) | |
| download | libgit2-73b51450a3194ddaa2ac180a1fea25fdf66971bb.tar.gz | |
Add support for macros and cache flush API.
Add support for git attribute macro definitions. Also, add
support for cache flush API to clear the attribute file content
cache when needed.
Additionally, improved the handling of global and system files,
making common utility functions in fileops and converting config
and attr to both use the common functions.
Adds a bunch more tests and fixed some memory leaks. Note that
adding macros required me to use refcounted attribute assignment
definitions, which complicated, but probably improved memory usage.
Diffstat (limited to 'src/win32/utf-conv.c')
| -rw-r--r-- | src/win32/utf-conv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/win32/utf-conv.c b/src/win32/utf-conv.c index b41c78f92..b1b838eb7 100644 --- a/src/win32/utf-conv.c +++ b/src/win32/utf-conv.c @@ -57,6 +57,11 @@ wchar_t* gitwin_to_utf16(const char* str) return ret; } +int gitwin_append_utf16(wchar_t *buffer, const char *str, size_t len) +{ + return MultiByteToWideChar(_active_codepage, 0, str, -1, buffer, len); +} + char* gitwin_from_utf16(const wchar_t* str) { char* ret; |
