2
0

ldebug.h 942 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. ** $Id: ldebug.h,v 1.29 2002/08/08 20:08:41 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. #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1)
  10. #define getline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0)
  11. #define resethookcount(L) (L->hookcount = lua_getmaskcount(L->hookmask))
  12. #define setallowhook(L,cond) ((L->hookmask) = ((L->hookmask) & ~1) | (cond))
  13. #define allowhook(L) ((L->hookmask) & 1)
  14. void luaG_typeerror (lua_State *L, const TObject *o, const char *opname);
  15. void luaG_concaterror (lua_State *L, StkId p1, StkId p2);
  16. void luaG_aritherror (lua_State *L, StkId p1, const TObject *p2);
  17. int luaG_ordererror (lua_State *L, const TObject *p1, const TObject *p2);
  18. void luaG_runerror (lua_State *L, const char *fmt, ...);
  19. void luaG_errormsg (lua_State *L);
  20. int luaG_checkcode (const Proto *pt);
  21. #endif