$ luarocks install lrefA pure-lua implementation of luaL_ref and luaL_unref.
The logic is copied exactly from Lua 5.5's source code, using the 5.5 behavior.
A reference table `t` has the freelist head at `t[1]`. If this value is `0` or
absent, the freelist is empty. If the value is non-zero, setting a reference
value sets that slot to the value.
Versions
Dependencies
lua>=5.1