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

Explicitly mark fields which may be null #55

Merged
merged 3 commits into from
Jan 13, 2021

Conversation

msiglreith
Copy link
Member

  • Encode nullable fields of the handle types in the typesystem (Option<NonNull<_>>). The current change is not exhaustive as I'm not familiar with some platforms (e.g Web)
  • Adjust docs to allow platform cases where the handles may need to be invalidated over time or further gated by platform specifics like winit/android.

Fixes #54

Copy link
Contributor

@Lokathor Lokathor left a comment

Choose a reason for hiding this comment

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

Windows HWND values are just *mut c_void, so they can be null. That's generally the "invalid handle" value, and all your OS calls will generally fail and such, but it's a legal bit pattern.

Other than that this seems good.

@Lokathor
Copy link
Contributor

Looks good. All set on your end @msiglreith ?

@msiglreith
Copy link
Member Author

fine for me 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Android interactions
2 participants