mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 22:36:09 +00:00
use wchar_t instead of WCHAR #6998
wchar_t has better cross-platform support and seems to fix an issue on MinGW when building with `-std=c99`.
This commit is contained in:

committed by
Justin M. Keyes

parent
66a39fce6c
commit
09cd4d0a43
@@ -1052,7 +1052,7 @@ char *os_resolve_shortcut(const char *fname)
|
||||
hr = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_IShellLinkW, (void **)&pslw);
|
||||
if (hr == S_OK) {
|
||||
WCHAR *p;
|
||||
wchar_t *p;
|
||||
const int conversion_result = utf8_to_utf16(fname, &p);
|
||||
if (conversion_result != 0) {
|
||||
EMSG2("utf8_to_utf16 failed: %d", conversion_result);
|
||||
@@ -1080,7 +1080,7 @@ char *os_resolve_shortcut(const char *fname)
|
||||
# endif
|
||||
|
||||
// Get the path to the link target.
|
||||
ZeroMemory(wsz, MAX_PATH * sizeof(WCHAR));
|
||||
ZeroMemory(wsz, MAX_PATH * sizeof(wchar_t));
|
||||
hr = pslw->lpVtbl->GetPath(pslw, wsz, MAX_PATH, &ffdw, 0);
|
||||
if (hr == S_OK && wsz[0] != NUL) {
|
||||
const int conversion_result = utf16_to_utf8(wsz, &rfname);
|
||||
|
Reference in New Issue
Block a user