Closed jschwe closed 2 months ago
This seems fine though it seems the build is failing on Windows.
I suspect c strings are i8 on windows? It's a common cross-platform error.
I suspect c strings are i8 on windows? It's a common cross-platform error.
The nice thing about CStr
is that the as_ptr()
method documents that it [returns *const c_char
](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#method.as_ptr. This allows us to remove a lot of the casts in the window specific code.
While removing those needless casts, I stumbled a bit over CreateWindowExA accepting a u16
encoded in a pointer type and added a comment in the source code explaining it.
Convert usage of byte str and normal str with a
\0
to cstr literals where possible