lua-users home
lua-l archive

Re: setfenv/getfenv

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


On 2010年01月12日, Tony Finch <dot@dotat.at> wrote:
> On 2010年1月12日, Leo Razoumov wrote:
> >
> > Correct me if I am wrong, in proxy tables for a key "foo"
> > __index/__newindex are relevant only if the table does not already
> > have key "foo". A chunk can do the following thing to mess everything
> > up for all future invocations of the chunk within other "compartments"
>
>
> If you don't want a chunk to mess with metatables, don't give it access to
> the metatable functions.
>
> Tony.
Metatables/metamethods are such an important part of Lua that making
getmetatable unreachable for a chunk or plugin will severe handicap
it.
--Leo--

AltStyle によって変換されたページ (->オリジナル) /