lua-users home
lua-l archive

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

> I once wrote a function for 4.0 to do this, see lua_getcclosure() at 
>  At the time Roberto said 
> they might add it to the next version of Lua, but this feature doesn't 
> get requested much and has fallen into the cracks.

We are still planning to put it, but it would work only to read upvalues
(not to set them); it would be more a debugging tool. If you need more
flexibility from upvalues, use a table instead (as ET already pointed
out). Then you have complete freedom to do whatever you want (add new
values, change them, share them across different closures, etc.)

-- Roberto