lua-users home
lua-l archive

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


I'm only just getting my head around this at the moment, but I think you automatically get this behaviour in lua 5.2.

As I understand it, if you load the function, then change the first upvalue to be the table associated with your c++ object. That table will the become the global environment for the function, and anything it calls.

Kev