Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.

fix usage of @ptrCast, should be @intToPtr #18

Merged
merged 1 commit into from
Aug 12, 2023

Conversation

binarycraft007
Copy link
Contributor

Fix as described by commit message

@freiguy1
Copy link

@mattnite I just ran into this problem when starting up a new project. Could this change get reviewed & merged?

deps/stmicro-stm32/src/chips/STM32F103.zig:115:30: error: expected 1 argument, found 2
            pub const TIM2 = @ptrCast(*volatile types.TIM2, 0x40000000);

@mattnite
Copy link
Contributor

@binarycraft007 can you please update the PR by running the 0.11.0 zig fmt on this file? @freiguy1 theres still the inferences typing that was added to builtins.

@freiguy1
Copy link

Sorry for the ignorance, but I'm not sure what you meant by the part of your comment addressed to me. I did a little digging and found this issue: ziglang/zig#5909 with a couple PRs attached to it. Maybe you were just providing context about why this happened. I'd probably be fine on an older version of zig.

@binarycraft007
Copy link
Contributor Author

@binarycraft007 can you please update the PR by running the 0.11.0 zig fmt on this file? @freiguy1 theres still the inferences typing that was added to builtins.

just rerun zig fmt on it

@mattnite
Copy link
Contributor

@binarycraft007 Thanks! @freiguy1 sorry I was just quickly explaining why I couldn't merge yet. I'm away on a trip but the plan is to stabilize on 0.11.0 for microzig. There was a big change to builtins where they infer their return type instead of having them specified in an argument.

@mattnite mattnite merged commit c9e394c into ZigEmbeddedGroup:main Aug 12, 2023
1 check was pending
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants