rlm@1: /* rlm@1: ** $Id: ldebug.h,v 2.3.1.1 2007/12/27 13:02:25 roberto Exp $ rlm@1: ** Auxiliary functions from Debug Interface module rlm@1: ** See Copyright Notice in lua.h rlm@1: */ rlm@1: rlm@1: #ifndef ldebug_h rlm@1: #define ldebug_h rlm@1: rlm@1: rlm@1: #include "lstate.h" rlm@1: rlm@1: rlm@1: #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) rlm@1: rlm@1: #define getline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0) rlm@1: rlm@1: #define resethookcount(L) (L->hookcount = L->basehookcount) rlm@1: rlm@1: rlm@1: LUAI_FUNC void luaG_typeerror (lua_State *L, const TValue *o, rlm@1: const char *opname); rlm@1: LUAI_FUNC void luaG_concaterror (lua_State *L, StkId p1, StkId p2); rlm@1: LUAI_FUNC void luaG_aritherror (lua_State *L, const TValue *p1, rlm@1: const TValue *p2); rlm@1: LUAI_FUNC int luaG_ordererror (lua_State *L, const TValue *p1, rlm@1: const TValue *p2); rlm@1: LUAI_FUNC void luaG_runerror (lua_State *L, const char *fmt, ...); rlm@1: LUAI_FUNC void luaG_errormsg (lua_State *L); rlm@1: LUAI_FUNC int luaG_checkcode (const Proto *pt); rlm@1: LUAI_FUNC int luaG_checkopenop (Instruction i); rlm@1: rlm@1: #endif