aboutsummaryrefslogtreecommitdiff
path: root/lvm.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-06-13 11:15:22 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-06-13 11:15:22 -0300
commit5fa2bec1f06f5b935036bd9e7c6a65b82f88dd39 (patch)
tree6f6c875e8b46f9dab76c4cc92f51822cd6b1b4f2 /lvm.c
parent746a1d612b975e1ec2b0ea906e6932f2497f5391 (diff)
downloadlua-5fa2bec1f06f5b935036bd9e7c6a65b82f88dd39.tar.gz
lua-5fa2bec1f06f5b935036bd9e7c6a65b82f88dd39.tar.bz2
lua-5fa2bec1f06f5b935036bd9e7c6a65b82f88dd39.zip
bug: current line should work for call hook
Diffstat (limited to 'lvm.c')
-rw-r--r--lvm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lvm.c b/lvm.c
index c44ac8c6..1c5beb77 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 2.45 2005/05/20 15:53:42 roberto Exp roberto $ 2** $Id: lvm.c,v 2.46 2005/05/31 14:25:18 roberto Exp roberto $
3** Lua virtual machine 3** Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -364,8 +364,11 @@ StkId luaV_execute (lua_State *L, int nexeccalls) {
364 TValue *k; 364 TValue *k;
365 const Instruction *pc; 365 const Instruction *pc;
366 callentry: /* entry point when calling new functions */ 366 callentry: /* entry point when calling new functions */
367 if (L->hookmask & LUA_MASKCALL) 367 if (L->hookmask & LUA_MASKCALL) {
368 L->savedpc++; /* hooks assume 'pc' is already incremented */
368 luaD_callhook(L, LUA_HOOKCALL, -1); 369 luaD_callhook(L, LUA_HOOKCALL, -1);
370 L->savedpc--; /* correct 'pc' */
371 }
369 retentry: /* entry point when returning to old functions */ 372 retentry: /* entry point when returning to old functions */
370 pc = L->savedpc; 373 pc = L->savedpc;
371 cl = &clvalue(L->ci->func)->l; 374 cl = &clvalue(L->ci->func)->l;