lua-users home
lua-l archive

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


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 Rio).

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.

  Enrico