lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> I'm not sure whether it is possible to detect the native endianess 
> and/or integer word size in pure Lua

In Lua 5.3, you can:

a=string.packint(1)
print(#a)		-- native lua_Integer size
print(a:byte(1,1))	-- native endianness