diff options
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 2.145 2015/11/02 11:48:59 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.146 2015/11/02 14:06:01 roberto Exp roberto $ |
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 | */ |
@@ -150,6 +150,11 @@ int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) { | |||
150 | /* }====================================================== */ | 150 | /* }====================================================== */ |
151 | 151 | ||
152 | 152 | ||
153 | /* | ||
154 | ** {================================================================== | ||
155 | ** Stack reallocation | ||
156 | ** =================================================================== | ||
157 | */ | ||
153 | static void correctstack (lua_State *L, TValue *oldstack) { | 158 | static void correctstack (lua_State *L, TValue *oldstack) { |
154 | CallInfo *ci; | 159 | CallInfo *ci; |
155 | UpVal *up; | 160 | UpVal *up; |
@@ -229,6 +234,14 @@ void luaD_shrinkstack (lua_State *L) { | |||
229 | } | 234 | } |
230 | 235 | ||
231 | 236 | ||
237 | void luaD_inctop (lua_State *L) { | ||
238 | luaD_checkstack(L, 1); | ||
239 | L->top++; | ||
240 | } | ||
241 | |||
242 | /* }================================================================== */ | ||
243 | |||
244 | |||
232 | void luaD_hook (lua_State *L, int event, int line) { | 245 | void luaD_hook (lua_State *L, int event, int line) { |
233 | lua_Hook hook = L->hook; | 246 | lua_Hook hook = L->hook; |
234 | if (hook && L->allowhook) { | 247 | if (hook && L->allowhook) { |