This repository was archived by the owner on Jul 10, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix private-in-public warnings (error E0446)
Fixed by prepending
pub
to the offending types. Not sure if its the best way but it was the only thing that worked. Other methods I've tried to maintain privateness:#[repr(C)]
does not accept modulesFix use of extern static warnings by wrapping in unsafe block (error E0133)
I think this is self-explanatory.
Fix zero-size struct warnings on certain CT* types
Wrap around c_void as I believe the types are only used as pointers. Again, let me know if there is a better way to do this. I've tried following this discussion on opaque C types but I don't think there is a consensus. I came across this discussion from the Rust SDL2 bindings and they eventually opted for the solution that I implemented.
This is my first pull request (hence, first open source contribution) and I've been playing with Rust for the past few weeks. So please, if anything isnt up to standards or correctness, let me know! Also, to squash the other warnings, those changes would have to made in the modules where those types reside (core-graphics and core-foundation). I would gladly open a PR to fix those too if all looks good.
Thanks!
This change is