macro 'incr_top' replaced by function 'luaD_inctop'. (It is not used

in critical time pathes, can save a few bytes without the macro)
This commit is contained in:
Roberto Ierusalimschy
2015-11-02 14:09:30 -02:00
parent 33b366ec32
commit 8c1fb91802
5 changed files with 24 additions and 11 deletions

15
ldo.c
View File

@@ -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) {