aboutsummaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldo.c')
-rw-r--r--ldo.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ldo.c b/ldo.c
index 20f36450..41b41756 100644
--- a/ldo.c
+++ b/ldo.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldo.c,v 2.198 2018/03/05 14:13:55 roberto Exp roberto $ 2** $Id: ldo.c,v 2.199 2018/03/07 16:26: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*/
@@ -268,7 +268,7 @@ void luaD_inctop (lua_State *L) {
268** function, can be changed asynchronously by signals.) 268** function, can be changed asynchronously by signals.)
269*/ 269*/
270void luaD_hook (lua_State *L, int event, int line, 270void luaD_hook (lua_State *L, int event, int line,
271 int fTransfer, int nTransfer) { 271 int ftransfer, int ntransfer) {
272 lua_Hook hook = L->hook; 272 lua_Hook hook = L->hook;
273 if (hook && L->allowhook) { /* make sure there is a hook */ 273 if (hook && L->allowhook) { /* make sure there is a hook */
274 int mask = CIST_HOOKED; 274 int mask = CIST_HOOKED;
@@ -279,10 +279,10 @@ void luaD_hook (lua_State *L, int event, int line,
279 ar.event = event; 279 ar.event = event;
280 ar.currentline = line; 280 ar.currentline = line;
281 ar.i_ci = ci; 281 ar.i_ci = ci;
282 if (nTransfer != 0) { 282 if (ntransfer != 0) {
283 mask |= CIST_TRAN; /* 'ci' has transfer information */ 283 mask |= CIST_TRAN; /* 'ci' has transfer information */
284 ci->u2.transferinfo.fTransfer = fTransfer; 284 ci->u2.transferinfo.ftransfer = ftransfer;
285 ci->u2.transferinfo.nTransfer = nTransfer; 285 ci->u2.transferinfo.ntransfer = ntransfer;
286 } 286 }
287 luaD_checkstack(L, LUA_MINSTACK); /* ensure minimum stack size */ 287 luaD_checkstack(L, LUA_MINSTACK); /* ensure minimum stack size */
288 if (L->top + LUA_MINSTACK > ci->top) 288 if (L->top + LUA_MINSTACK > ci->top)
@@ -329,10 +329,10 @@ static void rethook (lua_State *L, CallInfo *ci, StkId firstres, int nres) {
329 L->top = ci->top; /* correct top */ 329 L->top = ci->top; /* correct top */
330 } 330 }
331 if (L->hookmask & LUA_MASKRET) { /* is return hook on? */ 331 if (L->hookmask & LUA_MASKRET) { /* is return hook on? */
332 int fTransfer; 332 int ftransfer;
333 ci->func += delta; /* if vararg, back to virtual 'func' */ 333 ci->func += delta; /* if vararg, back to virtual 'func' */
334 fTransfer = cast(unsigned short, firstres - ci->func); 334 ftransfer = cast(unsigned short, firstres - ci->func);
335 luaD_hook(L, LUA_HOOKRET, -1, fTransfer, nres); /* call it */ 335 luaD_hook(L, LUA_HOOKRET, -1, ftransfer, nres); /* call it */
336 ci->func -= delta; 336 ci->func -= delta;
337 } 337 }
338 if (isLua(ci->previous)) 338 if (isLua(ci->previous))