[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Registering common values in 5.2
- From: Nevin Flanagan <Alestane@...>
- Date: Mon, 8 Mar 2010 20:48:46 -0500
One thing that occurred to me in the wake of the proposal to remove closure environments was how we go about sharing private values such as look-up tables after the change. If a table held in common between C closures should be a common upvalue, that pretty much wrecks using luaL_register as it's currently implemented, unless I'm missing something.
Any chance we could get an argument added to luaL_register, the number of values on top of the stack (possibly excluding the uppermost value if the registered name is NULL), to be attached as upvalues to ALL C functions being registered?