ldebug.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. ** $Id: ldebug.h,v 2.12 2014/11/10 14:46:05 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 getfuncline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : -1)
  11. #define resethookcount(L) (L->hookcount = L->basehookcount)
  12. LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o,
  13. const char *opname);
  14. LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1,
  15. const TValue *p2);
  16. LUAI_FUNC l_noret luaG_opinterror (lua_State *L, const TValue *p1,
  17. const TValue *p2,
  18. const char *msg);
  19. LUAI_FUNC l_noret luaG_tointerror (lua_State *L, const TValue *p1,
  20. const TValue *p2);
  21. LUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1,
  22. const TValue *p2);
  23. LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...);
  24. LUAI_FUNC l_noret luaG_errormsg (lua_State *L);
  25. LUAI_FUNC void luaG_traceexec (lua_State *L);
  26. #endif