|
On 23-Sep-06, at 5:14 PM, D Burgess wrote:
I second the thanks. I would also like to lnow the answer to Dons question. DB On 9/24/06, Don Hopkins <dhopkins@donhopkins.com> wrote:Thanks for explaining how lua_setfenv effects threads. I have a question like the one about threads: is the environment of a userdata used for anything other than user defined purposes?
Section 2.9 of the 5.1 reference manual states:"Environments associated with userdata have no meaning for Lua. It is only a convenience feature for programmers to associate a table to a userdata."
I've put a small tutorial (or at least example) on the Wiki at http://lua-users.org/wiki/UserDataEnvironmentExamples
Also see some musings about Userdata environment tables at http://lua-users.org/wiki/EnvironmentTables and http://lua-users.org/wiki/UserDataRefinement