lua-users home
lua-l archive

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


Hi,


I wonder if there is any way to "shallow" clone a Lua closure in C. By say "shallow" cloning I mean the clone and original Lua closure share the same Proto and upvalues, but can have different environment table.

I tried lua_pushvalue(), but it only make a direct reference for GC-able objects, which include closures.

Thanks!