Skip to content

breaking: Change Win32 to use pointers instead of ints#183

Merged
notgull merged 1 commit intomasterfrom
notgull/win32
Feb 21, 2026
Merged

breaking: Change Win32 to use pointers instead of ints#183
notgull merged 1 commit intomasterfrom
notgull/win32

Conversation

@notgull
Copy link
Member

@notgull notgull commented Feb 7, 2026

Needed as per new Win32 metadata updates

Fixes: #171
Supersedes: #154

@notgull notgull requested a review from Lokathor February 7, 2026 07:06
@kchibisov
Copy link
Member

can we just store both?

@kchibisov
Copy link
Member

kchibisov commented Feb 7, 2026

Or maybe provide method to get a ptr or maybe store as ptr and get a method to get as usize. We were storing them as ptr before, then they were made into integer per migration to windows-rs stuff, and now we move them back to ptr, so at this point maybe just having both should be fine?

@madsmtm
Copy link
Member

madsmtm commented Feb 8, 2026

Or maybe provide method to get a ptr or maybe store as ptr and get a method to get as usize. We were storing them as ptr before, then they were made into integer per migration to windows-rs stuff, and now we move them back to ptr, so at this point maybe just having both should be fine?

I'm against storing both, but we could have a method to cast these.

Then again, users on all other platforms are gonna need a cast from c_void to whatever , it's not really a big deal for a windows-sys v0.52.0 user to do that cast themselves.

@notgull
Copy link
Member Author

notgull commented Feb 9, 2026

Or maybe provide method to get a ptr or maybe store as ptr and get a method to get as usize. We were storing them as ptr before, then they were made into integer per migration to windows-rs stuff, and now we move them back to ptr, so at this point maybe just having both should be fine?

Not sure if this is useful. windows-sys currently represents the handle as a pointer. If it goes back to being an integer for some reason, we can add helper methods for converting to and from integer.

Needed as per new Win32 metadata updates

Fixes: #171
Signed-off-by: John Nunley <dev@notgull.net>
@notgull notgull merged commit 7539aef into master Feb 21, 2026
4 checks passed
@notgull notgull deleted the notgull/win32 branch February 21, 2026 16:52
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.

Change Windows HANDLE types back to *mut c_void **again** 😩?

4 participants