[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua and C - misc questions
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 23 Aug 2005 07:07:15 -0300
> what I'm asking about is how to identify which gobal functions and
> variables were added by a specific chunk, so I'd be able to remove them.
No need for that. Just set the environment to an empty table with
a __index metamethod pointing to the actual environment. This will
allow the chunk to read anything you have in the actual original but
changes will be made to the new environment, leaving the original
environment intact. You can also add your own versions of some functions
and variables to the new environment, to mask those in the original
environment. --lhf