Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix call to selectSymbol in std.os.windows.user32.messageBoxW #8539

Merged
merged 1 commit into from
Apr 16, 2021

Conversation

Manuzor
Copy link
Contributor

@Manuzor Manuzor commented Apr 15, 2021

Arguments to selectSymbol were passed in the wrong order. It expects the static function pointer as first argument.

fn selectSymbol(comptime function_static: anytype, function_dynamic: @TypeOf(function_static), comptime os: std.Target.Os.WindowsVersion) @TypeOf(function_static) {
comptime {
const sym_ok = builtin.Target.current.os.isAtLeast(.windows, os);
if (sym_ok == true) return function_static;
if (sym_ok == null) return function_dynamic;
if (sym_ok == false) @compileError("Target OS range does not support function, at least " ++ @tagName(os) ++ " is required");
}
}

Arguments to `selectSymbol` were passed in the wrong order.
@Manuzor
Copy link
Contributor Author

Manuzor commented Apr 16, 2021

I'm not sure how my change could've caused the azure pipelines check to fail. I assume it's not on my end? Especially since the Mac OS cmake step has failed but I only touched windows specific stuff in the std lib.

@andrewrk andrewrk merged commit 2cd49d2 into ziglang:master Apr 16, 2021
@andrewrk
Copy link
Member

You just happened to open the PR when the CI was broken due to llvm12 upgrade. Not your fault! Thanks for the fix. I want to mention however #4426 in which we will likely end up removing user32.dll extern decls from std lib altogether.

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