lua-users home
lua-l archive

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


On 12 September 2011 00:26, Richter, Jörg <Joerg.Richter@pdv-fs.de> wrote:
>> In Lua you cannot sandbox a metatable away. An offending script still
>> might just call getmetatable.
>
> Then use __metatable:
>
> http://www.lua.org/manual/5.1/manual.html#pdf-getmetatable
>
>   Jörg
>
>

As a note to using __metatable; its a good idea to return a
string/object unique to each metatable.
Its nice if code can use getmetatable() to check for type equality.

D