Change Windows `HANDLE` types back to `*mut c_void` **again** :weary:?
MarijnS95 opened this issue ยท 4 comments
FYI,
win32metadata
is changing these back to void pointers it seems:microsoft/win32metadata#1924
microsoft/win32metadata@b4dfd2fSee also my local regeneration: microsoft/windows-rs@96b9a27
Originally posted by @MarijnS95 in #136 (comment)
This is out now in the windows 0.58
release and somewhat annoying when using raw-window-handle
together with it.
deep and heavy sigh
We can change them back to pointers. If they decide to go back to usize
just keep them as pointers.
Actually wait, does this impact us? From the issue linked above:
Rust currently emits isize/usize integers as a result of decomposing our synthetic handle types and encountering IntPtr/UIntPtr. Rust would now like to emit pointers to better align with its core handle type, but it cannot differentiate between legitimate pointer-sized integers (e.g. LRESULT) and handles (e.g. HMODULE).
Since window IDs in Windows are just indexes into a thread-local table, they're still semantically usize
/isize
. So it's still correct (by Rust's standards) to not change them here, even if win32metadata
doesn't realize it.