Idris2
Idris2 copied to clipboard
[RefC] Add 16 and 32 bit access to base/Data.Buffer .
Some FFI definitions are missing in base/Data.Buffer. This PR adds 16 and 32 bit access routines.
What's the convention behind the
*LEnames? Why is it not uniform?
I suspect it's "Little Endian". It won't matter in 99% of the cases, since most modern machines are LE, but the ones where it does matter it'll likely mess up everything to do with assumed behaviour of bit shifts on (unsigned) integers...
What's the convention behind the
*LEnames? Why is it not uniform?I suspect it's "Little Endian". It won't matter in 99% of the cases, since most modern machines are LE
Not only machines have set endianness, but also protocols. Say, if one would use Data.Buffer to form a network packet where usually Big Endian is used disregarding endianness of the machine where the code is executed, one would definitely want to understand the order bytes are put into the buffer.