[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Is there anyway to make a new Lua closure sharing the same code with old one but with different env table?
- From: Chaos Wang <chaoslawful@...>
- Date: Mon, 21 Jun 2010 11:03:44 +0800
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!