commit 2258ec6bc94bc127024a49e29a0b40f58a5ae0a3
parent 2598138eced28b6ff8d4db9550a4e70c26cd4baa
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Wed, 10 Jun 2009 13:57:29 -0300
'getline' renamed to 'getfuncline' (to avoid problems with POSIX)
Diffstat:
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/ldebug.c b/ldebug.c
@@ -1,5 +1,5 @@
/*
-** $Id: ldebug.c,v 2.50 2009/05/04 18:26:21 roberto Exp roberto $
+** $Id: ldebug.c,v 2.51 2009/06/01 19:09:26 roberto Exp roberto $
** Debug Interface
** See Copyright Notice in lua.h
*/
@@ -44,7 +44,7 @@ static int currentline (CallInfo *ci) {
if (pc < 0)
return -1; /* only active lua functions have current-line information */
else
- return getline(ci_func(ci)->l.p, pc);
+ return getfuncline(ci_func(ci)->l.p, pc);
}
diff --git a/ldebug.h b/ldebug.h
@@ -1,5 +1,5 @@
/*
-** $Id: ldebug.h,v 2.3 2005/04/25 19:24:10 roberto Exp roberto $
+** $Id: ldebug.h,v 2.4 2009/04/30 17:42:21 roberto Exp roberto $
** Auxiliary functions from Debug Interface module
** See Copyright Notice in lua.h
*/
@@ -13,7 +13,7 @@
#define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1)
-#define getline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0)
+#define getfuncline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0)
#define resethookcount(L) (L->hookcount = L->basehookcount)
diff --git a/ltests.c b/ltests.c
@@ -1,5 +1,5 @@
/*
-** $Id: ltests.c,v 2.62 2009/04/17 22:00:01 roberto Exp roberto $
+** $Id: ltests.c,v 2.63 2009/06/01 19:09:26 roberto Exp roberto $
** Internal Module for Debugging of the Lua Implementation
** See Copyright Notice in lua.h
*/
@@ -402,7 +402,7 @@ static char *buildop (Proto *p, int pc, char *buff) {
Instruction i = p->code[pc];
OpCode o = GET_OPCODE(i);
const char *name = luaP_opnames[o];
- int line = getline(p, pc);
+ int line = getfuncline(p, pc);
sprintf(buff, "(%4d) %4d - ", line, pc);
switch (getOpMode(o)) {
case iABC:
diff --git a/lvm.c b/lvm.c
@@ -1,5 +1,5 @@
/*
-** $Id: lvm.c,v 2.89 2009/05/27 17:11:27 roberto Exp roberto $
+** $Id: lvm.c,v 2.90 2009/06/01 19:09:26 roberto Exp roberto $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -67,10 +67,10 @@ static void traceexec (lua_State *L) {
if (mask & LUA_MASKLINE) {
Proto *p = ci_func(ci)->l.p;
int npc = pcRel(ci->u.l.savedpc, p);
- int newline = getline(p, npc);
+ int newline = getfuncline(p, npc);
if (npc == 0 || /* call linehook when enter a new function, */
ci->u.l.savedpc <= L->oldpc || /* when jump back (loop), or when */
- newline != getline(p, pcRel(L->oldpc, p))) /* enter a new line */
+ newline != getfuncline(p, pcRel(L->oldpc, p))) /* enter a new line */
luaD_callhook(L, LUA_HOOKLINE, newline);
}
L->oldpc = ci->u.l.savedpc;