1323530Savg/* 2323530Savg** $Id: lvm.h,v 2.18.1.1 2013/04/12 18:48:47 roberto Exp $ 3323530Savg** Lua virtual machine 4323530Savg** See Copyright Notice in lua.h 5323530Savg*/ 6323530Savg 7323530Savg#ifndef lvm_h 8323530Savg#define lvm_h 9323530Savg 10323530Savg 11323530Savg#include "ldo.h" 12323530Savg#include "lobject.h" 13323530Savg#include "ltm.h" 14323530Savg 15323530Savg 16323530Savg#define tostring(L,o) (ttisstring(o) || (luaV_tostring(L, o))) 17323530Savg 18323530Savg#define tonumber(o,n) (ttisnumber(o) || (((o) = luaV_tonumber(o,n)) != NULL)) 19323530Savg 20323530Savg#define equalobj(L,o1,o2) (ttisequal(o1, o2) && luaV_equalobj_(L, o1, o2)) 21323530Savg 22323530Savg#define luaV_rawequalobj(o1,o2) equalobj(NULL,o1,o2) 23323530Savg 24323530Savg 25323530Savg/* not to called directly */ 26323530SavgLUAI_FUNC int luaV_equalobj_ (lua_State *L, const TValue *t1, const TValue *t2); 27323530Savg 28323530Savg 29323530SavgLUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r); 30323530SavgLUAI_FUNC int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r); 31323530SavgLUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n); 32323530SavgLUAI_FUNC int luaV_tostring (lua_State *L, StkId obj); 33323530SavgLUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key, 34323530Savg StkId val); 35323530SavgLUAI_FUNC void luaV_settable (lua_State *L, const TValue *t, TValue *key, 36323530Savg StkId val); 37323530SavgLUAI_FUNC void luaV_finishOp (lua_State *L); 38323530SavgLUAI_FUNC void luaV_execute (lua_State *L); 39323530SavgLUAI_FUNC void luaV_concat (lua_State *L, int total); 40323530SavgLUAI_FUNC void luaV_arith (lua_State *L, StkId ra, const TValue *rb, 41323530Savg const TValue *rc, TMS op); 42323530SavgLUAI_FUNC void luaV_objlen (lua_State *L, StkId ra, const TValue *rb); 43323530Savg 44323530Savg#endif 45