lua-users home
lua-l archive

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


But I see that's all covered in the separate setfenv discussion from a week
or so ago regarding sandboxes. I need to do less mental filtering based on
topics.

Mark

on 10/20/03 11:11 AM, Mark Hamburg at mhamburg@adobe.com wrote:

> That's what I did as well. My recollection, however, is that using pairs in
> the spawned environment didn't work because the implementation does a rawget
> on "next" in the global environment and hence doesn't see any of the
> inherited global values.
> 
> Mark
> 
> on 10/20/03 10:33 AM, Joel Pritchett at jpritchett@sammystudios.com wrote:
> 
>> In our implementation our new thread global table actually contains the
>> old global table as an element so when something isn't found in the
>> local table it goes and looks for it in the old global table (which was
>> most likely the state that spawned the thread).
>> 
>> This is nice for us because we get the ability to have both thread local
>> data and shared global data and it didn't break any of the behaviors of
>> lua that we had before we put in out own env tables.
>> 
>> Joel
>