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

Don't expose macOS implementation details in the public API #220

Merged
merged 1 commit into from
Sep 8, 2024

Conversation

madsmtm
Copy link
Contributor

@madsmtm madsmtm commented Sep 7, 2024

The show_context_menu_for_nsview method previously used the objc::runtime::Object type, which means that the library's dependence on objc is exposed as part of the public API.

Additionally, since the method is taking a raw pointer (and as such is unsound because it allows passing e.g. ptr::dangling()), I took the opportunity to also mark the method as unsafe.

This is done in preparation for transitioning to objc2, CC tauri-apps/wry#1239.

The `show_context_menu_for_nsview` method previously used the
`objc::runtime::Object` type, which means that the library's dependence
on `objc` is exposed as part of the public API.

Additionally, since the method is taking a raw pointer (and as such
would be unsound if passing e.g. `ptr::dangling()`), I took the
opportunity to also mark the method as `unsafe`.

This is done in preparation for transitioning to `objc2`.
@amrbashir amrbashir merged commit 0d368bb into tauri-apps:dev Sep 8, 2024
8 checks passed
@madsmtm madsmtm deleted the macos-make-impl-private branch September 8, 2024 05:52
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.

2 participants