aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mbyte.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/mbyte.c')
-rw-r--r--src/nvim/mbyte.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c
index a8781ffbb8..ea538fb4fc 100644
--- a/src/nvim/mbyte.c
+++ b/src/nvim/mbyte.c
@@ -1328,7 +1328,7 @@ static int utf_strnicmp(const char_u *s1, const char_u *s2, size_t n1,
#endif
/// Reassigns `strw` to a new, allocated pointer to a UTF16 string.
-int utf8_to_utf16(const char *str, WCHAR **strw)
+int utf8_to_utf16(const char *str, wchar_t **strw)
FUNC_ATTR_NONNULL_ALL
{
ssize_t wchar_len = 0;
@@ -1344,7 +1344,7 @@ int utf8_to_utf16(const char *str, WCHAR **strw)
return GetLastError();
}
- ssize_t buf_sz = wchar_len * sizeof(WCHAR);
+ ssize_t buf_sz = wchar_len * sizeof(wchar_t);
if (buf_sz == 0) {
*strw = NULL;
@@ -1358,19 +1358,19 @@ int utf8_to_utf16(const char *str, WCHAR **strw)
0,
str,
-1,
- (WCHAR *)pos,
+ (wchar_t *)pos,
wchar_len);
assert(r == wchar_len);
if (r != wchar_len) {
EMSG2("MultiByteToWideChar failed: %d", r);
}
- *strw = (WCHAR *)pos;
+ *strw = (wchar_t *)pos;
return 0;
}
/// Reassigns `str` to a new, allocated pointer to a UTF8 string.
-int utf16_to_utf8(const WCHAR *strw, char **str)
+int utf16_to_utf8(const wchar_t *strw, char **str)
FUNC_ATTR_NONNULL_ALL
{
// Compute the space required to store the string as UTF-8.
@@ -2201,7 +2201,7 @@ HINSTANCE vimLoadLib(char *name)
// NOTE: Do not use mch_dirname() and mch_chdir() here, they may call
// vimLoadLib() recursively, which causes a stack overflow.
- WCHAR old_dirw[MAXPATHL];
+ wchar_t old_dirw[MAXPATHL];
// Path to exe dir.
char *buf = xstrdup((char *)get_vim_var_str(VV_PROGPATH));