commit efde3ed04a8745a567f2cb964b45e094bae59344 (tree)
parent d60c100eb6f1d91b3b2bb6ac38f08450c7ec8356
Author: Ryan Liptak <squeek502@hotmail.com>
Date: Mon, 29 Jul 2024 06:07:20 -0700
Fix compile error due to GetModuleFileNameW binding change
In https://github.com/ziglang/zig/pull/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: https://github.com/ziglang/zig/issues/20858
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/std/os/windows/kernel32.zig b/lib/std/os/windows/kernel32.zig
@@ -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;