1997-09-17 03:25:59 +08:00
|
|
|
/*
|
2011-06-01 02:27:56 +08:00
|
|
|
** $Id: lvm.h,v 2.16 2011/05/31 18:24:36 roberto Exp roberto $
|
1997-09-17 03:25:59 +08:00
|
|
|
** Lua virtual machine
|
|
|
|
** See Copyright Notice in lua.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef lvm_h
|
|
|
|
#define lvm_h
|
|
|
|
|
|
|
|
|
|
|
|
#include "ldo.h"
|
|
|
|
#include "lobject.h"
|
1998-07-13 00:16:43 +08:00
|
|
|
#include "ltm.h"
|
1997-09-17 03:25:59 +08:00
|
|
|
|
|
|
|
|
2009-11-07 01:05:34 +08:00
|
|
|
#define tostring(L,o) (ttisstring(o) || (luaV_tostring(L, o)))
|
2002-02-08 01:24:05 +08:00
|
|
|
|
2009-11-07 01:05:34 +08:00
|
|
|
#define tonumber(o,n) (ttisnumber(o) || (((o) = luaV_tonumber(o,n)) != NULL))
|
1997-09-17 03:25:59 +08:00
|
|
|
|
2011-06-01 02:27:56 +08:00
|
|
|
#define equalobj(L,o1,o2) (ttisequal(o1, o2) && luaV_equalobj_(L, o1, o2))
|
2002-06-13 21:39:55 +08:00
|
|
|
|
2011-06-01 02:27:56 +08:00
|
|
|
#define luaV_rawequalobj(t1,t2) \
|
|
|
|
(ttisequal(t1,t2) && luaV_equalobj_(NULL,t1,t2))
|
2011-06-01 02:24:36 +08:00
|
|
|
|
1997-09-17 03:25:59 +08:00
|
|
|
|
2007-02-09 21:04:52 +08:00
|
|
|
/* not to called directly */
|
2011-06-01 02:27:56 +08:00
|
|
|
LUAI_FUNC int luaV_equalobj_ (lua_State *L, const TValue *t1, const TValue *t2);
|
2007-02-09 21:04:52 +08:00
|
|
|
|
2011-06-01 02:24:36 +08:00
|
|
|
|
2005-04-26 03:24:10 +08:00
|
|
|
LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r);
|
2009-06-18 00:17:14 +08:00
|
|
|
LUAI_FUNC int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r);
|
2005-04-26 03:24:10 +08:00
|
|
|
LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n);
|
|
|
|
LUAI_FUNC int luaV_tostring (lua_State *L, StkId obj);
|
|
|
|
LUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key,
|
|
|
|
StkId val);
|
|
|
|
LUAI_FUNC void luaV_settable (lua_State *L, const TValue *t, TValue *key,
|
|
|
|
StkId val);
|
2009-03-11 01:14:37 +08:00
|
|
|
LUAI_FUNC void luaV_finishOp (lua_State *L);
|
2008-08-26 21:27:42 +08:00
|
|
|
LUAI_FUNC void luaV_execute (lua_State *L);
|
2009-05-28 01:11:27 +08:00
|
|
|
LUAI_FUNC void luaV_concat (lua_State *L, int total);
|
2009-11-20 03:04:58 +08:00
|
|
|
LUAI_FUNC void luaV_arith (lua_State *L, StkId ra, const TValue *rb,
|
|
|
|
const TValue *rc, TMS op);
|
2009-12-18 00:20:01 +08:00
|
|
|
LUAI_FUNC void luaV_objlen (lua_State *L, StkId ra, const TValue *rb);
|
1997-09-17 03:25:59 +08:00
|
|
|
|
|
|
|
#endif
|