Skip to content

Commit efde3ed

Browse files
squeek502andrewrk
authored andcommitted
Fix compile error due to GetModuleFileNameW binding change
In #19641, this binding changed from `[*]u16` to `LPWSTR` which made it a sentinel-terminated pointer. This introduced a compiler error in the `std.os.windows.GetModuleFileNameW` wrapper since it takes a `[*]u16` pointer. This commit changes the binding back to what it was before instead of introducing a breaking change to `std.os.windows.GetModuleFileNameW` Related: #20858
1 parent d60c100 commit efde3ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/os/windows/kernel32.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ pub extern "kernel32" fn GetProcessHeap() callconv(WINAPI) ?HANDLE;
597597
// TODO: Wrapper around LdrGetDllFullName.
598598
pub extern "kernel32" fn GetModuleFileNameW(
599599
hModule: ?HMODULE,
600-
lpFilename: LPWSTR,
600+
lpFilename: [*]WCHAR,
601601
nSize: DWORD,
602602
) callconv(WINAPI) DWORD;
603603

0 commit comments

Comments
 (0)