[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Is there anyway to "shallow" clone a Lua closure using C API?
- From: Chaos Wang <chaoslawful@...>
- Date: Thu, 17 Jun 2010 10:00:52 +0800
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.