ldebug.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. ** $Id: ldebug.h,v 1.25 2002/07/08 20:22:08 roberto Exp roberto $
  3. ** Auxiliary functions from Debug Interface module
  4. ** See Copyright Notice in lua.h
  5. */
  6. #ifndef ldebug_h
  7. #define ldebug_h
  8. #include "lstate.h"
  9. #include "luadebug.h"
  10. #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1)
  11. #define getline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0)
  12. #define resethookcount(L) \
  13. (L->hookcount = lua_getmaskcount(L->hookmask), L->hookcount *= L->hookcount)
  14. #define setallowhook(L,cond) ((L->hookmask) = ((L->hookmask) & ~1) | (cond))
  15. #define allowhook(L) ((L->hookmask) & 1)
  16. void luaG_saveallpcs (lua_State *L);
  17. void luaG_typeerror (lua_State *L, const TObject *o, const char *opname);
  18. void luaG_concaterror (lua_State *L, StkId p1, StkId p2);
  19. void luaG_aritherror (lua_State *L, StkId p1, const TObject *p2);
  20. int luaG_ordererror (lua_State *L, const TObject *p1, const TObject *p2);
  21. void luaG_runerror (lua_State *L, const char *fmt, ...);
  22. void luaG_errormsg (lua_State *L, int internal);
  23. int luaG_checkcode (const Proto *pt);
  24. #endif