[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: checking userdata type from lua
- From: roberto@... (Roberto Ierusalimschy)
- Date: Thu, 18 May 2006 10:53:23 -0300
> What about debug.setmetatable (object, table)?
>From the manual:
5.9 - The Debug Library
This library provides the functionality of the debug interface to Lua
programs. You should exert care when using this library. The functions
provided here should be used exclusively for debugging and similar
tasks, such as profiling. Please resist the temptation to use them as a
usual programming tool: They can be very slow. Moreover, several of its
functions violate some assumptions about Lua code (e.g., that variables
local to a function cannot be accessed from outside or that userdata
metatables cannot be changed by Lua code) and therefore can compromise
otherwise secure code.
-- Roberto