diff options
Diffstat (limited to 'ldo.h')
-rw-r--r-- | ldo.h | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.h,v 1.38 2002/01/11 20:24:39 roberto Exp $ | 2 | ** $Id: ldo.h,v 1.1 2001/11/29 22:14:34 rieru Exp rieru $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -16,10 +16,10 @@ | |||
16 | ** macro to increment stack top. | 16 | ** macro to increment stack top. |
17 | ** There must be always an empty slot at the L->stack.top | 17 | ** There must be always an empty slot at the L->stack.top |
18 | */ | 18 | */ |
19 | #define incr_top {if (L->top == L->stack_last) luaD_checkstack(L, 1); L->top++;} | 19 | #define incr_top(L) \ |
20 | {if (L->top >= L->stack_last) luaD_growstack(L, 1); L->top++;} | ||
20 | 21 | ||
21 | 22 | #define luaD_checkstack(L,n) if (L->stack_last-(n)<=L->top) luaD_growstack(L, n) | |
22 | #define luaD_checkstack(L,n) if (L->stack_last-(n)<=L->top) luaD_stackerror(L) | ||
23 | 23 | ||
24 | 24 | ||
25 | void luaD_lineHook (lua_State *L, int line, lua_Hook linehook); | 25 | void luaD_lineHook (lua_State *L, int line, lua_Hook linehook); |
@@ -27,7 +27,9 @@ void luaD_callHook (lua_State *L, lua_Hook callhook, const char *event); | |||
27 | StkId luaD_precall (lua_State *L, StkId func); | 27 | StkId luaD_precall (lua_State *L, StkId func); |
28 | void luaD_call (lua_State *L, StkId func, int nResults); | 28 | void luaD_call (lua_State *L, StkId func, int nResults); |
29 | void luaD_poscall (lua_State *L, int wanted, StkId firstResult); | 29 | void luaD_poscall (lua_State *L, int wanted, StkId firstResult); |
30 | void luaD_stackerror (lua_State *L); | 30 | void luaD_reallocCI (lua_State *L, int newsize); |
31 | void luaD_reallocstack (lua_State *L, int newsize); | ||
32 | void luaD_growstack (lua_State *L, int n); | ||
31 | 33 | ||
32 | void luaD_error (lua_State *L, const char *s); | 34 | void luaD_error (lua_State *L, const char *s); |
33 | void luaD_breakrun (lua_State *L, int errcode); | 35 | void luaD_breakrun (lua_State *L, int errcode); |