lua-users home
lua-l archive

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

2015-10-07 0:53 GMT+02:00 Soni L. <>:

> loadx is a Lua 5.2 and Lua 5.3 library which provides a better `load()`. It
> currently supports:
> ...
> - You can set ALL the upvalues, not just the first! This, combined with the
> above, makes this library perfect for seriali(s|z)ing and
> (de|un)seriali(s|z)ing functions!

Maybe loadx could also return a table of upvalues, with names as
a list and values as a key-value pair, i.e.

f, upvals = loadx(chunk,nil,nil,'foo','bar')
-- upvals = {'a','b',a='foo',b='bar'}