[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: setfenv/getfenv
- From: Enrico Colombini <erix@...>
- Date: Tue, 12 Jan 2010 19:09:13 +0100
Jerome Vuarand wrote:
One way to restrict such abusive uses, which can easily become a mess
(I guess all agree on that), would have been to restrict
setfenv/getfenv so they no longer can take their integer parameter,
ie. they can only modified a function that is passed directly as a
reference rather than a call stack index.
Possibly not a bad compromise, in my view (but I think the Lua author
can see much farther than myself, so I'll just take whatever comes from
Re-thinking about what I wrote earlier, embedded systems are probably
not a problem, as they contain a C side anyway: either a specialized
loader (as Luiz suggested) or the use of lua_setfenv/lua_getfenv would
give ample freedom.