lua-users home
lua-l archive

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


On Fri, 07 Jan 2011 17:59:47 +0200, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:

Does anyone still use references in real applications? For what?

I have a modified index2adr that allows range of pseudoindices to map to values in the
array part of the registry.
I have also modified copies of luaL_ref and luaL_unref that work only with the
registry, implicitly (no argument 't').

This is used by non-lua part of the code to implement references to Lua values,
and to have well-known indices to important values.
It also makes C part more readable, sometimes reducing number of Lua API calls
more than twice.