lua-users home
lua-l archive

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


> getmetatable() works on any object, but setmetatable() only works on
> tables?

Yes, for security, specially for userdata. Otherwise you could turn arbitrary
things into file handles, thus probably crashing the host app. --lhf