Skip to content

Conversation

@squeek502
Copy link
Member

@squeek502 squeek502 commented Jul 29, 2024

In #19641 (cc @The-King-of-Toasters), this binding changed from [*]u16 to LPWSTR which made it a sentinel-terminated pointer. This introduced a compile 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


Note: Neither std.os.windows.kernel32.GetModuleFileNameW nor std.os.windows.GetModuleFileNameW is used by Zig internally (instead, std.os.windows.kernel32.GetModuleFileNameExW is used in std.debug). So an alternate fix here might be to just delete the binding and the wrapper in std.os.windows.

In ziglang#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: ziglang#20858
@andrewrk andrewrk merged commit efde3ed into ziglang:master Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants