lua-users home
lua-l archive

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


> Example, lua 5.4 work-1 math.random :
>
> It uses upvalue to store the 128-bits random state.
> Why not use static uint64_t state[2] ?

Lua libraires are supposed to be used with independent Lua states and
so can only store static values in the states, not in C.