lua-users home
lua-l archive

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


> Is it possible to store off the current 'table address' held in the
> stack, so I can quickly push it back later?

You can use:
- lua_ref to get an int reference to your table
- lua_getref to push your ref'd table back on the stack, and
- lua_unref to release the reference

This'll work in both Lua 4 and 5.

Ashwin.