1 /* 2 ** $Id: lvm.h,v 1.1 2002/02/14 10:46:59 jcatki 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 tonumber(o) ((ttype(o) != LUA_TNUMBER) && (luaV_tonumber(o) != 0)) 17 #define tostring(L,o) ((ttype(o) != LUA_TSTRING) && (luaV_tostring(L, o) != 0)) 18 19 20 int luaV_tonumber (TObject *obj); 21 int luaV_tostring (lua_State *L, TObject *obj); 22 const TObject *luaV_gettable (lua_State *L, StkId t); 23 void luaV_settable (lua_State *L, StkId t, StkId key); 24 const TObject *luaV_getglobal (lua_State *L, TString *s); 25 void luaV_setglobal (lua_State *L, TString *s); 26 StkId luaV_execute (lua_State *L, const Closure *cl, StkId base); 27 void luaV_Cclosure (lua_State *L, lua_CFunction c, int nelems); 28 void luaV_Lclosure (lua_State *L, Proto *l, int nelems); 29 int luaV_lessthan (lua_State *L, const TObject *l, const TObject *r, StkId top); 30 void luaV_strconc (lua_State *L, int total, StkId top); 31 32 #endif 33