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

Allow c_void pointers as return and argument types in more cases (behind a feature flag) #478

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

madsmtm
Copy link
Owner

@madsmtm madsmtm commented Jul 31, 2023

Will help with servo/core-foundation-rs#628, since a lot of CoreFoundation types are used there as just *mut c_void, and it would be really cumbersome and error-prone to have to change all of these to custom type aliases with a proper Encode implementation.

@madsmtm madsmtm added enhancement New feature or request A-objc2 Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` crates labels Jul 31, 2023
@madsmtm madsmtm changed the title Let c_void be a valid encoding in more places Let ^v be a valid encoding in more places Jul 31, 2023
@madsmtm
Copy link
Owner Author

madsmtm commented Jul 31, 2023

I'm considering implementing the logic in objc2 instead, so that it doesn't pollute the "pure" objc2-encode, and it would allow us to change it more freely in later breaking releases, and put the functionality behind a feature flag instead!

EDIT: Done.

@madsmtm madsmtm changed the title Let ^v be a valid encoding in more places Allow c_void pointers as return and argument types in more cases (behind a feature flag) Jul 31, 2023
@madsmtm madsmtm marked this pull request as ready for review July 31, 2023 14:45
@madsmtm madsmtm merged commit f2bd35a into master Jul 31, 2023
19 checks passed
@madsmtm madsmtm deleted the allow-c-void branch July 31, 2023 14:56
@madsmtm madsmtm added this to the Usable icrate milestone Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-objc2 Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` crates enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant