xref: /freebsd-src/sys/contrib/openzfs/module/lua/ldebug.h (revision eda14cbc264d6969b02f2b1994cef11148e914f1)
1*eda14cbcSMatt Macy /* BEGIN CSTYLED */
2*eda14cbcSMatt Macy /*
3*eda14cbcSMatt Macy ** $Id: ldebug.h,v 2.7.1.1 2013/04/12 18:48:47 roberto Exp $
4*eda14cbcSMatt Macy ** Auxiliary functions from Debug Interface module
5*eda14cbcSMatt Macy ** See Copyright Notice in lua.h
6*eda14cbcSMatt Macy */
7*eda14cbcSMatt Macy 
8*eda14cbcSMatt Macy #ifndef ldebug_h
9*eda14cbcSMatt Macy #define ldebug_h
10*eda14cbcSMatt Macy 
11*eda14cbcSMatt Macy 
12*eda14cbcSMatt Macy #include "lstate.h"
13*eda14cbcSMatt Macy 
14*eda14cbcSMatt Macy 
15*eda14cbcSMatt Macy #define pcRel(pc, p)	(cast(int, (pc) - (p)->code) - 1)
16*eda14cbcSMatt Macy 
17*eda14cbcSMatt Macy #define getfuncline(f,pc)	(((f)->lineinfo) ? (f)->lineinfo[pc] : 0)
18*eda14cbcSMatt Macy 
19*eda14cbcSMatt Macy #define resethookcount(L)	(L->hookcount = L->basehookcount)
20*eda14cbcSMatt Macy 
21*eda14cbcSMatt Macy /* Active Lua function (given call info) */
22*eda14cbcSMatt Macy #define ci_func(ci)		(clLvalue((ci)->func))
23*eda14cbcSMatt Macy 
24*eda14cbcSMatt Macy 
25*eda14cbcSMatt Macy LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o,
26*eda14cbcSMatt Macy                                                 const char *opname);
27*eda14cbcSMatt Macy LUAI_FUNC l_noret luaG_concaterror (lua_State *L, StkId p1, StkId p2);
28*eda14cbcSMatt Macy LUAI_FUNC l_noret luaG_aritherror (lua_State *L, const TValue *p1,
29*eda14cbcSMatt Macy                                                  const TValue *p2);
30*eda14cbcSMatt Macy LUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1,
31*eda14cbcSMatt Macy                                                  const TValue *p2);
32*eda14cbcSMatt Macy LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...);
33*eda14cbcSMatt Macy LUAI_FUNC l_noret luaG_errormsg (lua_State *L);
34*eda14cbcSMatt Macy 
35*eda14cbcSMatt Macy #endif
36*eda14cbcSMatt Macy /* END CSTYLED */
37