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 clone a Lua closure, where the clones share the same Proto and upvalues but have different environment tables?

I tried lua_pushvalue(), but it only make a direct reference for GC-able object (which includes closures), so there can't be different environment tables coexisted.

Any ideas?

Thanks!