3 ms·
No, most real-world C code will expect a C `int` to be 32 bits, while `isize` is often 64 bits. On the other hand, at least for Unix systems `long` is often eq
by cesarb 10y ago
No, most real-world C code will expect a C `int` to be 32 bits, while `isize` is often 64 bits.
On the other hand, at least for Unix systems `long` is often equivalent to Rust's `isize`: 32 bits for 32-bit architectures, and 64 bits for 64-bit architectures, so it would make sense to convert `long` to `isize`.