A pure-lua implementation of luaL_ref and luaL_unref

$ luarocks install lref

A 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

1.0.2-12 hours ago0 downloads
1.0.1-12 hours ago0 downloads
1.0.0-12 hours ago0 downloads

Dependencies

lua>=5.1

Manifests