lua-users home
lua-l archive

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


On 06.07.2010 08:46, libla wrote:
> Following codes:

> 
> In these closures b and c, method lua_pushcclosure is invalid and cannot
> be used.
> 

the docu says that c closures cannot share upvalues, see here:
http://www.lua.org/pil/27.3.3.html

"Unlike Lua closures, C closures cannot share upvalues: Each closure has
its own independent set. However, we can set the upvalues of different
functions to refer to a common table, so that this table becomes a
common place where those functions can share data."


 Michael