lvm.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. ** $Id: lvm.h,v 1.12 1999/11/22 13:12:07 roberto Exp roberto $
  3. ** Lua virtual machine
  4. ** See Copyright Notice in lua.h
  5. */
  6. #ifndef lvm_h
  7. #define lvm_h
  8. #include "ldo.h"
  9. #include "lobject.h"
  10. #include "ltm.h"
  11. #define tonumber(o) ((ttype(o) != LUA_T_NUMBER) && (luaV_tonumber(o) != 0))
  12. #define tostring(L, o) ((ttype(o) != LUA_T_STRING) && (luaV_tostring(L, o) != 0))
  13. void luaV_pack (lua_State *L, StkId firstel, int nvararg, TObject *tab);
  14. int luaV_tonumber (TObject *obj);
  15. int luaV_tostring (lua_State *L, TObject *obj);
  16. void luaV_setn (lua_State *L, Hash *t, int val);
  17. void luaV_gettable (lua_State *L);
  18. void luaV_settable (lua_State *L, StkId t);
  19. void luaV_rawsettable (lua_State *L, StkId t);
  20. void luaV_getglobal (lua_State *L, GlobalVar *gv);
  21. void luaV_setglobal (lua_State *L, GlobalVar *gv);
  22. StkId luaV_execute (lua_State *L, const Closure *cl, const TProtoFunc *tf, StkId base);
  23. void luaV_closure (lua_State *L, int nelems);
  24. void luaV_comparison (lua_State *L, StkId top, lua_Type ttype_less,
  25. lua_Type ttype_equal, lua_Type ttype_great, IMS op);
  26. #endif