xref: /freebsd-src/sys/contrib/openzfs/module/lua/lvm.h (revision eda14cbc264d6969b02f2b1994cef11148e914f1)
1*eda14cbcSMatt Macy /* BEGIN CSTYLED */
2*eda14cbcSMatt Macy /*
3*eda14cbcSMatt Macy ** $Id: lvm.h,v 2.18.1.1 2013/04/12 18:48:47 roberto Exp $
4*eda14cbcSMatt Macy ** Lua virtual machine
5*eda14cbcSMatt Macy ** See Copyright Notice in lua.h
6*eda14cbcSMatt Macy */
7*eda14cbcSMatt Macy 
8*eda14cbcSMatt Macy #ifndef lvm_h
9*eda14cbcSMatt Macy #define lvm_h
10*eda14cbcSMatt Macy 
11*eda14cbcSMatt Macy 
12*eda14cbcSMatt Macy #include "ldo.h"
13*eda14cbcSMatt Macy #include "lobject.h"
14*eda14cbcSMatt Macy #include "ltm.h"
15*eda14cbcSMatt Macy 
16*eda14cbcSMatt Macy 
17*eda14cbcSMatt Macy #define tostring(L,o) (ttisstring(o) || (luaV_tostring(L, o)))
18*eda14cbcSMatt Macy 
19*eda14cbcSMatt Macy #define tonumber(o,n)	(ttisnumber(o) || (((o) = luaV_tonumber(o,n)) != NULL))
20*eda14cbcSMatt Macy 
21*eda14cbcSMatt Macy #define equalobj(L,o1,o2)  (ttisequal(o1, o2) && luaV_equalobj_(L, o1, o2))
22*eda14cbcSMatt Macy 
23*eda14cbcSMatt Macy #define luaV_rawequalobj(o1,o2)		equalobj(NULL,o1,o2)
24*eda14cbcSMatt Macy 
25*eda14cbcSMatt Macy 
26*eda14cbcSMatt Macy /* not to called directly */
27*eda14cbcSMatt Macy LUAI_FUNC int luaV_equalobj_ (lua_State *L, const TValue *t1, const TValue *t2);
28*eda14cbcSMatt Macy 
29*eda14cbcSMatt Macy 
30*eda14cbcSMatt Macy LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r);
31*eda14cbcSMatt Macy LUAI_FUNC int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r);
32*eda14cbcSMatt Macy LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n);
33*eda14cbcSMatt Macy LUAI_FUNC int luaV_tostring (lua_State *L, StkId obj);
34*eda14cbcSMatt Macy LUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key,
35*eda14cbcSMatt Macy                                             StkId val);
36*eda14cbcSMatt Macy LUAI_FUNC void luaV_settable (lua_State *L, const TValue *t, TValue *key,
37*eda14cbcSMatt Macy                                             StkId val);
38*eda14cbcSMatt Macy LUAI_FUNC void luaV_finishOp (lua_State *L);
39*eda14cbcSMatt Macy LUAI_FUNC void luaV_execute (lua_State *L);
40*eda14cbcSMatt Macy LUAI_FUNC void luaV_concat (lua_State *L, int total);
41*eda14cbcSMatt Macy LUAI_FUNC void luaV_arith (lua_State *L, StkId ra, const TValue *rb,
42*eda14cbcSMatt Macy                            const TValue *rc, TMS op);
43*eda14cbcSMatt Macy LUAI_FUNC void luaV_objlen (lua_State *L, StkId ra, const TValue *rb);
44*eda14cbcSMatt Macy 
45*eda14cbcSMatt Macy #endif
46*eda14cbcSMatt Macy /* END CSTYLED */
47