aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ldebug.c4
-rw-r--r--ldebug.h4
-rw-r--r--ltests.c4
-rw-r--r--lvm.c6
4 files changed, 9 insertions, 9 deletions
diff --git a/ldebug.c b/ldebug.c
index 3e32f4a9..db5d1ebb 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.c,v 2.50 2009/05/04 18:26:21 roberto Exp roberto $ 2** $Id: ldebug.c,v 2.51 2009/06/01 19:09:26 roberto Exp roberto $
3** Debug Interface 3** Debug Interface
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -44,7 +44,7 @@ static int currentline (CallInfo *ci) {
44 if (pc < 0) 44 if (pc < 0)
45 return -1; /* only active lua functions have current-line information */ 45 return -1; /* only active lua functions have current-line information */
46 else 46 else
47 return getline(ci_func(ci)->l.p, pc); 47 return getfuncline(ci_func(ci)->l.p, pc);
48} 48}
49 49
50 50
diff --git a/ldebug.h b/ldebug.h
index 87b1f6a5..c37c9403 100644
--- a/ldebug.h
+++ b/ldebug.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.h,v 2.3 2005/04/25 19:24:10 roberto Exp roberto $ 2** $Id: ldebug.h,v 2.4 2009/04/30 17:42:21 roberto Exp roberto $
3** Auxiliary functions from Debug Interface module 3** Auxiliary functions from Debug Interface module
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -13,7 +13,7 @@
13 13
14#define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) 14#define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1)
15 15
16#define getline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0) 16#define getfuncline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0)
17 17
18#define resethookcount(L) (L->hookcount = L->basehookcount) 18#define resethookcount(L) (L->hookcount = L->basehookcount)
19 19
diff --git a/ltests.c b/ltests.c
index 4e26fbe6..e2c15f14 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 2.62 2009/04/17 22:00:01 roberto Exp roberto $ 2** $Id: ltests.c,v 2.63 2009/06/01 19:09:26 roberto Exp roberto $
3** Internal Module for Debugging of the Lua Implementation 3** Internal Module for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -402,7 +402,7 @@ static char *buildop (Proto *p, int pc, char *buff) {
402 Instruction i = p->code[pc]; 402 Instruction i = p->code[pc];
403 OpCode o = GET_OPCODE(i); 403 OpCode o = GET_OPCODE(i);
404 const char *name = luaP_opnames[o]; 404 const char *name = luaP_opnames[o];
405 int line = getline(p, pc); 405 int line = getfuncline(p, pc);
406 sprintf(buff, "(%4d) %4d - ", line, pc); 406 sprintf(buff, "(%4d) %4d - ", line, pc);
407 switch (getOpMode(o)) { 407 switch (getOpMode(o)) {
408 case iABC: 408 case iABC:
diff --git a/lvm.c b/lvm.c
index c3273804..ac36b844 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 2.89 2009/05/27 17:11:27 roberto Exp roberto $ 2** $Id: lvm.c,v 2.90 2009/06/01 19:09:26 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*/
@@ -67,10 +67,10 @@ static void traceexec (lua_State *L) {
67 if (mask & LUA_MASKLINE) { 67 if (mask & LUA_MASKLINE) {
68 Proto *p = ci_func(ci)->l.p; 68 Proto *p = ci_func(ci)->l.p;
69 int npc = pcRel(ci->u.l.savedpc, p); 69 int npc = pcRel(ci->u.l.savedpc, p);
70 int newline = getline(p, npc); 70 int newline = getfuncline(p, npc);
71 if (npc == 0 || /* call linehook when enter a new function, */ 71 if (npc == 0 || /* call linehook when enter a new function, */
72 ci->u.l.savedpc <= L->oldpc || /* when jump back (loop), or when */ 72 ci->u.l.savedpc <= L->oldpc || /* when jump back (loop), or when */
73 newline != getline(p, pcRel(L->oldpc, p))) /* enter a new line */ 73 newline != getfuncline(p, pcRel(L->oldpc, p))) /* enter a new line */
74 luaD_callhook(L, LUA_HOOKLINE, newline); 74 luaD_callhook(L, LUA_HOOKLINE, newline);
75 } 75 }
76 L->oldpc = ci->u.l.savedpc; 76 L->oldpc = ci->u.l.savedpc;