-
Notifications
You must be signed in to change notification settings - Fork 919
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
Use wrapper type for CFUUID #4032
base: master
Are you sure you want to change the base?
Conversation
Saw #4031 randomly and thought I'd take stab at it. I'm not sure this is releasing the right thing but it seems to work without issues. Please someone double check :) |
This no longer exposes `CGDisplayCreateUUIDFromDisplayID` and instead offers a new `CfUuid` type that can be created from a display ID and also cleans itself up on drop. Closes rust-windowing#4031
b662d4e
to
87d8a93
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think such wrappers actually already exist? Use core_foundation::uuid::CFUUID
and CFUUID::wrap_under_create_rule
?
Also, I was a bit unsure, but read the docs on ARC does seem to suggest that since the function contains |
Oh nice, didn't know about this! Also took me look into the source to confirm it calls release :) It doesn't seem to derive Hash, PartialOrd, and Ord, though… I can try to get this added upstream but I'm not even sure if treating these UUIDs as Ord makes sense? |
|
But I'd also be fine with converting them to a pointer, and implementing |
This no longer exposes
CGDisplayCreateUUIDFromDisplayID
and instead offers a newCfUuid
type that can be created from a display ID and also cleans itself up on drop.Closes #4031
changelog
module if knowledge of this change could be valuable to users