mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-12 17:24:09 +00:00
Allow parsing bcsave.lua (-b option) without FFI.
This commit is contained in:
parent
0b3d8375f7
commit
80ff9d69a3
@ -212,7 +212,8 @@ typedef struct {
|
|||||||
f32 = bit.bswap
|
f32 = bit.bswap
|
||||||
function f16(x) return bit.rshift(bit.bswap(x), 16) end
|
function f16(x) return bit.rshift(bit.bswap(x), 16) end
|
||||||
if is64 then
|
if is64 then
|
||||||
function fofs(x) return bit.bswap(x)*(2ll^32) end
|
local two32 = ffi.cast("int64_t", 2^32)
|
||||||
|
function fofs(x) return bit.bswap(x)*two32 end
|
||||||
else
|
else
|
||||||
fofs = f32
|
fofs = f32
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user