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

Update casts for latest Zig #19

Merged
merged 2 commits into from
Jun 27, 2023
Merged

Update casts for latest Zig #19

merged 2 commits into from
Jun 27, 2023

Conversation

abhinav
Copy link
Contributor

@abhinav abhinav commented Jun 23, 2023

This updates to account for the following changes to Zig:

The @enumToInt built-in was renamed to @intFromEnum.
ziglang/zig@a6c8ee5

Cast primitives dropped their first parameter, instead inferring it based on the destination type. https://ziggit.dev/t/major-zig-language-update-just-landed-removal-of-destination-type-from-all-cast-builtins/898

The `@enumToInt` built-in was just renamed to `@intFromEnum`.

ref: ziglang/zig@a6c8ee5
@abhinav
Copy link
Contributor Author

abhinav commented Jun 27, 2023

@abhinav abhinav changed the title @enumToInt => @intFromEnum Update casts for latest Zig Jun 27, 2023
`@bitCast` and other casts no longer need
the destination type as an argument.

ref: ziglang/zig#16163
@abhinav
Copy link
Contributor Author

abhinav commented Jun 27, 2023

Updated

@joachimschmidt557
Copy link
Member

Thanks!

@joachimschmidt557 joachimschmidt557 merged commit 5d2e8ca into ziglibs:master Jun 27, 2023
3 checks passed
@abhinav abhinav deleted the int-from-enum branch June 27, 2023 16:30
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.

None yet

2 participants