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

An initial implementation of objective-c generics for #1259 #1702

Merged
merged 2 commits into from
Jan 5, 2020

Conversation

simlay
Copy link
Contributor

@simlay simlay commented Jan 3, 2020

I think this PR closes #1259 and nearly finishes #109. I've been testing it out with the coreaudio-sys crate. Using this PR, I can get the bindgen the for AudioToolbox, AudioUnit, OpenAL, CoreMIDI frameworks. It does require blacklisting the timezone variable from time.h as it produces rust that conflicts with NSCalendar.h in the Foundation framework.

@highfive
Copy link

highfive commented Jan 3, 2020

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

// bindgen-flags: --objc-extern-crate -- -x objective-c
// bindgen-osx-only
@interface Base
@end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test should probably just reuse the objc_template.h header rather than making a whole new one.

Copy link
Contributor

@emilio emilio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine, thanks!

@emilio emilio merged commit f39c4a9 into rust-lang:master Jan 5, 2020
@simlay simlay mentioned this pull request Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ObjectiveC generics are not type erased properly
3 participants