[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] lua-marshal - fast table serialization
- From: Peter Cawley <lua@...>
- Date: Mon, 3 Jan 2011 13:26:38 +0000
On Mon, Jan 3, 2011 at 11:34 AM, Richard Hundt <firstname.lastname@example.org> wrote:
I take it that you haven't tested it on a big-endian system?
Writing a single byte using the following code relies heavily on
integers being little endian:
> int val_type = lua_type(L, val);
> buf_write(L, (void*)&val_type, MAR_CHR, buf);
Then there is the dubious section of code starting at "/* endianness
mismatch so reverse the bytes */", which seems to reverse the entire
data stream, rather than individually reversing every field within it.
Finally, the use of lua_dump means that persisted functions cannot
cross the endianness boundary by default.