ldebug.h 1012 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. ** $Id: ldebug.h,v 1.24 2002/07/08 18:21:33 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_typeerror (lua_State *L, const TObject *o, const char *opname);
  17. void luaG_concaterror (lua_State *L, StkId p1, StkId p2);
  18. void luaG_aritherror (lua_State *L, StkId p1, const TObject *p2);
  19. int luaG_ordererror (lua_State *L, const TObject *p1, const TObject *p2);
  20. void luaG_runerror (lua_State *L, const char *fmt, ...);
  21. void luaG_errormsg (lua_State *L, int internal);
  22. int luaG_checkcode (const Proto *pt);
  23. #endif