Commit efde3ed04a

Ryan Liptak <squeek502@hotmail.com>
2024-07-29 15:07:20
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
1 parent d60c100
Changed files (1)
lib
std
os
windows
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;