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