On Tue, 15 Oct 2013, Lourival Vieira Neto wrote:
In order to indicate that endianness conversion is necessary I need to know the future uses of the buffer. Clairvoyance excepted, that is kinda hard.It's a generic data structure that could be used to handle bit fields or nonaligned data.
Endianness should be a property of a field in a data structure, not a property of the entire data structure. There might be a mixture of big- and little-endian fields of different sizes in the same data structure. It seemed to me from a superficial reading that the proposed endianness flag in the Lua "buf" interface would not handle that.
--apb (Alan Barrett)