[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] lua-marshal - fast table serialization
- From: Richard Hundt <richardhundt@...>
- Date: Mon, 03 Jan 2011 14:38:46 +0100
On 01/03/2011 02:26 PM, Peter Cawley wrote:
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.
Thanks, I'll add cross endianness not being supported to the list of
caveats and remove all code which makes any attempt in this regard.