You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`libc::c_char` in Rust differs by target architecture:
- On most platforms (x86-64 Windows, Linux, macOS) it is `i8`.
- On Windows ARM64 (AArch64) it is `u8`.
This change unconditionally casts pointers with `as *const _`:
- On Windows ARM64, this converts `*const i8` to `*const u8` (or vice versa), resolving the type mismatch that caused compilation to fail.
- On other platforms, the cast is effectively a no-op but ensures the code compiles everywhere.
`CStr::from_ptr` only requires a pointer to a null-terminated byte sequence.
The underlying representation of `i8` and `u8` is identical, so the cast is
sound.
Signed-off-by: filipw <[email protected]>
0 commit comments