From 8c1fb918027eea52c229907e3c3e371c7c14923a Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 2 Nov 2015 14:09:30 -0200 Subject: macro 'incr_top' replaced by function 'luaD_inctop'. (It is not used in critical time pathes, can save a few bytes without the macro) --- ldo.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'ldo.c') diff --git a/ldo.c b/ldo.c index 524c1e57..beb77bcb 100644 --- a/ldo.c +++ b/ldo.c @@ -1,5 +1,5 @@ /* -** $Id: ldo.c,v 2.145 2015/11/02 11:48:59 roberto Exp roberto $ +** $Id: ldo.c,v 2.146 2015/11/02 14:06:01 roberto Exp roberto $ ** Stack and Call structure of Lua ** See Copyright Notice in lua.h */ @@ -150,6 +150,11 @@ int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) { /* }====================================================== */ +/* +** {================================================================== +** Stack reallocation +** =================================================================== +*/ static void correctstack (lua_State *L, TValue *oldstack) { CallInfo *ci; UpVal *up; @@ -229,6 +234,14 @@ void luaD_shrinkstack (lua_State *L) { } +void luaD_inctop (lua_State *L) { + luaD_checkstack(L, 1); + L->top++; +} + +/* }================================================================== */ + + void luaD_hook (lua_State *L, int event, int line) { lua_Hook hook = L->hook; if (hook && L->allowhook) { -- cgit v1.2.3-55-g6feb