1 /* 2 ** $Id: ldo.h,v 1.1 2002/02/14 10:46:59 jcatki Exp $ 3 ** Stack and Call structure of Lua 4 ** See Copyright Notice in lua.h 5 */ 6 7 #ifndef ldo_h 8 #define ldo_h 9 10 11 #include "lobject.h" 12 #include "lstate.h" 13 14 15 /* 16 ** macro to increment stack top. 17 ** There must be always an empty slot at the L->stack.top 18 */ 19 #define incr_top {if (L->top == L->stack_last) luaD_checkstack(L, 1); L->top++;} 20 21 22 void luaD_init (lua_State *L, int stacksize); 23 void luaD_adjusttop (lua_State *L, StkId base, int extra); 24 void luaD_lineHook (lua_State *L, StkId func, int line, lua_Hook linehook); 25 void luaD_call (lua_State *L, StkId func, int nResults); 26 void luaD_callTM (lua_State *L, Closure *f, int nParams, int nResults); 27 void luaD_checkstack (lua_State *L, int n); 28 29 void luaD_breakrun (lua_State *L, int errcode); 30 int luaD_runprotected (lua_State *L, void (*f)(lua_State *, void *), void *ud); 31 32 33 #endif 34