~rootmos/lua-hack

ff1b3abe2bb86e79f8a0163b3f8edad582b1068a — Gustav Behm 1 year, 2 months ago 33ffc05 build
Fix 32-bits build
2 files changed, 8 insertions(+), 3 deletions(-)

M scripts/lua32
M ser.test.lua
M scripts/lua32 => scripts/lua32 +2 -2
@@ 25,8 25,8 @@ if [ ! -d "$DESTDIR" ]; then
    sed -i 's,^INSTALL_TOP= /usr/local$,INSTALL_TOP= '"$DESTDIR"',' "$ROOT/Makefile"
    sed -i 's,^#define LUA_32BITS\s\+0$,#define LUA_32BITS 1,' "$ROOT/src/luaconf.h"

    make -C "$ROOT"
    make -C "$ROOT" install
    make 1>&2 -C "$ROOT"
    make 1>&2 -C "$ROOT" install
fi

"$DESTDIR/bin/lua" "$@"

M ser.test.lua => ser.test.lua +6 -1
@@ 35,8 35,13 @@ function test_serialize_number_float()
    lu.assertEquals(S.serialize(3.0), "3.0")
    lu.assertEquals(S.serialize(-4.05), "-4.05")
    lu.assertEquals(S.serialize(6e-7), "6e-07")
    lu.assertEquals(S.serialize(8.9e+10), "89000000000.0")
    lu.assertEquals(S.serialize(1e+14), "1e+14")

    if require("bits") == 64 then
        lu.assertEquals(S.serialize(8.9e+10), "89000000000.0")
    else
        lu.assertEquals(S.serialize(8.9e+10), "8.9e+10")
    end
end

function test_deserialize_number_float()