Open uucidl opened 6 years ago
Not reproduced on Windows, where it seems we have:
typedef unsigned long long uint64_t;
typedef unsigned __int64 size_t;
Ah well. I think that usize = uint64
is kind of the correct answer, and that the long/int/short C integer zoo is messy.
Maybe usize can stay purely uint64 and builtins could simply have a c_size synonymous with size_t.
I tested the idea of having a c_size
, it creates some friction, as now size_t
and the return value of sizeof
are not anymore synonymous.
See repro at: https://github.com/uucidl/bitwise/commit/a96b0369f8fe062953906e1a3471a73bb910d582
Expected:
Got:
I would have expected C apis expressed in terms of size_t to be exposed in ion via usize. It appears that on Macos at least:
Since usize is defined as uint64, we see that these types differ.