ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

ldo.h

Go to the documentation of this file.
00001 /*
00002 ** Stack and Call structure of Lua
00003 ** See Copyright Notice in lua.h
00004 */
00005 
00006 #ifndef GRIM_LDO_H
00007 #define GRIM_LDO_H
00008 
00009 
00010 #include "engines/grim/lua/lobject.h"
00011 #include "engines/grim/lua/lstate.h"
00012 
00013 namespace Grim {
00014 
00015 #define MULT_RET        255
00016 
00017 
00018 /*
00019 ** macro to increment stack top.
00020 ** There must be always an empty slot at the lua_state->stack.top
00021 */
00022 #define incr_top { if (lua_state->stack.top >= lua_state->stack.last) luaD_checkstack(1); lua_state->stack.top++; }
00023 
00024 // macros to convert from lua_Object to (TObject *) and back
00025 
00026 #define Address(lo)     ((lo) + lua_state->stack.stack - 1)
00027 #define Ref(st)         ((st) - lua_state->stack.stack + 1)
00028 
00029 void luaD_init();
00030 void luaD_initthr();
00031 void luaD_adjusttop(StkId newtop);
00032 void luaD_openstack(int32 nelems);
00033 void luaD_lineHook(int32 line);
00034 void luaD_callHook(StkId base, TProtoFunc *tf, int32 isreturn);
00035 void luaD_postret(StkId firstResult);
00036 int32 luaD_call(StkId base, int32 nResults);
00037 void luaD_callTM(TObject *f, int32 nParams, int32 nResults);
00038 int32 luaD_protectedrun(int32 nResults);
00039 void luaD_gcIM(TObject *o);
00040 void luaD_travstack(int32 (*fn)(TObject *));
00041 void luaD_checkstack(int32 n);
00042 
00043 } // end of namespace Grim
00044 
00045 #endif


Generated on Sat Mar 23 2019 05:01:46 for ResidualVM by doxygen 1.7.1
curved edge   curved edge