HWND
in raw_window_handle.rs
is hardcoded to 4 bytes width
#1365
Labels
HWND
in raw_window_handle.rs
is hardcoded to 4 bytes width
#1365
In
raw_window_handle.rs
HWND
is a struct with alibc::c_int
field, but it's defined as an alias forisize
in bothraw-window-handle
andwindows-rs
. This inconsistency is error prone when working with crates that interface with Win32 APIs, or when writing code that interfaces with Win32 directly.I think it would be a lot smarter to follow the lead of
windows-rs
here and useisize
rather than copying the C Win32 API (whereHWND
isvoid*
) so literally (but also not literally since it's a struct?).Before I make a PR I thought I'd ask: is there a specific reason it's done this way? (and why it's a struct at all and not a unit type?)
The text was updated successfully, but these errors were encountered: