1/*	$NetBSD$	*/
2
3/*
4** Id: ldebug.h,v 2.3.1.1 2007/12/27 13:02:25 roberto Exp
5** Auxiliary functions from Debug Interface module
6** See Copyright Notice in lua.h
7*/
8
9#ifndef ldebug_h
10#define ldebug_h
11
12
13#include "lstate.h"
14
15
16#define pcRel(pc, p)	(cast(int, (pc) - (p)->code) - 1)
17
18#define getline(f,pc)	(((f)->lineinfo) ? (f)->lineinfo[pc] : 0)
19
20#define resethookcount(L)	(L->hookcount = L->basehookcount)
21
22
23LUAI_FUNC void luaG_typeerror (lua_State *L, const TValue *o,
24                                             const char *opname);
25LUAI_FUNC void luaG_concaterror (lua_State *L, StkId p1, StkId p2);
26LUAI_FUNC void luaG_aritherror (lua_State *L, const TValue *p1,
27                                              const TValue *p2);
28LUAI_FUNC int luaG_ordererror (lua_State *L, const TValue *p1,
29                                             const TValue *p2);
30LUAI_FUNC void luaG_runerror (lua_State *L, const char *fmt, ...);
31LUAI_FUNC void luaG_errormsg (lua_State *L);
32LUAI_FUNC int luaG_checkcode (const Proto *pt);
33LUAI_FUNC int luaG_checkopenop (Instruction i);
34
35#endif
36