[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: endianness of lua bytecode?
- From: Ando Sonenblick <ando@...>
- Date: Mon, 1 Nov 2004 13:54:09 -0800
thx for the insight. So, if the endianness of the byte code dump is
stored within the dump does that mean that I can take the bytecode that
was "compiled" from text on a little endian machine, save it to disk,
then load it on a machine that is big endian and run the dump and lua
will properly notice the endianness mismatch and byte swap as
Or can you simply not take byte code from one endian machine onto an
opposite endian machine?
They have the endianess of the machine where you're dumping them.
luaU_dump stores a byte that indicates the machine's endianess along
with the bytecodes, so luaU_undump can adjust, if the endianess of the
machine where you are reading the bytecodes is different. Check
ldump.c and lundump.c if you are curious.
On Mon, 1 Nov 2004 10:30:40 -0800, Ando Sonenblick <firstname.lastname@example.org>
Does lua's byte code have an endianness? Or is it really all in 8-bit