lua-users home
lua-l archive

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

Hi David,

>       lua_createtable(L1,0,0);
>       lua_setfenv(L1, funix); /* remove reference to env */

> It would seem that this also set the environment of the function in
> *all* executing threads. 

Yes, that's what it is intended to do: change the environment of the
*executing* C function.  To change the environment use lua_replace(L1,
LUA_ENVIRONINDEX).  It is a bit confusing maybe...


This message and attachment(s) are intended solely for the use of the addressee and may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law.  
If you are not the intended recipient or agent thereof responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited.  
If you have received this communication in error, please notify the sender immediately by telephone and with a "reply" message.  
Thank you for your cooperation.