aboutsummaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-11-02 14:09:30 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-11-02 14:09:30 -0200
commit8c1fb918027eea52c229907e3c3e371c7c14923a (patch)
tree8b853acd641ff9c8a8f5cc7b6c5e83cbe1d51c17 /ldo.c
parent33b366ec321646890780b96df96eacb558b82f6d (diff)
downloadlua-8c1fb918027eea52c229907e3c3e371c7c14923a.tar.gz
lua-8c1fb918027eea52c229907e3c3e371c7c14923a.tar.bz2
lua-8c1fb918027eea52c229907e3c3e371c7c14923a.zip
macro 'incr_top' replaced by function 'luaD_inctop'. (It is not used
in critical time pathes, can save a few bytes without the macro)
Diffstat (limited to 'ldo.c')
-rw-r--r--ldo.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/ldo.c b/ldo.c
index 524c1e57..beb77bcb 100644
--- a/ldo.c
+++ b/ldo.c
@@ -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*/
153static void correctstack (lua_State *L, TValue *oldstack) { 158static 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
237void luaD_inctop (lua_State *L) {
238 luaD_checkstack(L, 1);
239 L->top++;
240}
241
242/* }================================================================== */
243
244
232void luaD_hook (lua_State *L, int event, int line) { 245void 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) {