lua-users home
lua-l archive

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


lua_stripdebug() seems like a reasonable interface.

from lobject.h:

typedef struct Proto {
  CommonHeader;
  TValue *k;  /* constants used by the function */
  Instruction *code;
  struct Proto **p;  /* functions defined inside the function */

  /* ... lines removed ... */
} Proto;

So lua_stripdebug should recursively strip the 'p' array, touching even more closures. That, or lua_stripdebug would be useless for stripping a loaded chunk.

--
Wim