Skip to content

Commit

Permalink
Fix compile error due to GetModuleFileNameW binding change
Browse files Browse the repository at this point in the history
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
  • Loading branch information
squeek502 authored and andrewrk committed Jul 29, 2024
1 parent d60c100 commit efde3ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/std/os/windows/kernel32.zig
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ pub extern "kernel32" fn GetProcessHeap() callconv(WINAPI) ?HANDLE;
// TODO: Wrapper around LdrGetDllFullName.
pub extern "kernel32" fn GetModuleFileNameW(
hModule: ?HMODULE,
lpFilename: LPWSTR,
lpFilename: [*]WCHAR,
nSize: DWORD,
) callconv(WINAPI) DWORD;

Expand Down

0 comments on commit efde3ed

Please sign in to comment.