1/*	$NetBSD$	*/
2
3/*
4** Id: lvm.h,v 2.5.1.1 2007/12/27 13:02:25 roberto Exp
5** Lua virtual machine
6** See Copyright Notice in lua.h
7*/
8
9#ifndef lvm_h
10#define lvm_h
11
12
13#include "ldo.h"
14#include "lobject.h"
15#include "ltm.h"
16
17
18#define tostring(L,o) ((ttype(o) == LUA_TSTRING) || (luaV_tostring(L, o)))
19
20#define tonumber(o,n)	(ttype(o) == LUA_TNUMBER || \
21                         (((o) = luaV_tonumber(o,n)) != NULL))
22
23#define equalobj(L,o1,o2) \
24	(ttype(o1) == ttype(o2) && luaV_equalval(L, o1, o2))
25
26
27LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r);
28LUAI_FUNC int luaV_equalval (lua_State *L, const TValue *t1, const TValue *t2);
29LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n);
30LUAI_FUNC int luaV_tostring (lua_State *L, StkId obj);
31LUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key,
32                                            StkId val);
33LUAI_FUNC void luaV_settable (lua_State *L, const TValue *t, TValue *key,
34                                            StkId val);
35LUAI_FUNC void luaV_execute (lua_State *L, int nexeccalls);
36LUAI_FUNC void luaV_concat (lua_State *L, int total, int last);
37
38#endif
39