lua-users home
lua-l archive

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


On 2010-01-12, Tony Finch <dot@dotat.at> wrote:
> On Tue, 12 Jan 2010, 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--