Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4680 right-hear 1
/*
2
** $Id: lvm.h,v 2.14 2009/12/17 16:20:01 roberto Exp $
3
** Lua virtual machine
4
** See Copyright Notice in lua.h
5
*/
6
 
7
#ifndef lvm_h
8
#define lvm_h
9
 
10
 
11
#include "ldo.h"
12
#include "lobject.h"
13
#include "ltm.h"
14
 
15
 
16
#define tostring(L,o) (ttisstring(o) || (luaV_tostring(L, o)))
17
 
18
#define tonumber(o,n)	(ttisnumber(o) || (((o) = luaV_tonumber(o,n)) != NULL))
19
 
20
#define equalobj(L,o1,o2) \
21
	(ttype(o1) == ttype(o2) && luaV_equalval_(L, o1, o2))
22
 
23
 
24
/* not to called directly */
25
LUAI_FUNC int luaV_equalval_ (lua_State *L, const TValue *t1, const TValue *t2);
26
 
27
LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r);
28
LUAI_FUNC int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r);
29
LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n);
30
LUAI_FUNC int luaV_tostring (lua_State *L, StkId obj);
31
LUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key,
32
                                            StkId val);
33
LUAI_FUNC void luaV_settable (lua_State *L, const TValue *t, TValue *key,
34
                                            StkId val);
35
LUAI_FUNC void luaV_finishOp (lua_State *L);
36
LUAI_FUNC void luaV_execute (lua_State *L);
37
LUAI_FUNC void luaV_concat (lua_State *L, int total);
38
LUAI_FUNC void luaV_arith (lua_State *L, StkId ra, const TValue *rb,
39
                           const TValue *rc, TMS op);
40
LUAI_FUNC void luaV_objlen (lua_State *L, StkId ra, const TValue *rb);
41
 
42
#endif