lua-users home
lua-l archive

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

> 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