lua-users home
lua-l archive

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


> > That's dangerous. If you expose the registry, you can turn a udata from
> > one type to another. So you could convert a button to a file and then
> > call close on it, which will probably crash the host app.
> 
> isn't this already possible with setmetatable() ?

No, try it! From Lua you can only set the metatables of tables, not of
udata, precisely to avoid crashing the host app from Lua.

Lua is secure, unless *you* make it insecure...
--lhf