'getline' renamed to 'getfuncline' (to avoid problems with POSIX)

This commit is contained in:
Roberto Ierusalimschy
2009-06-10 13:57:53 -03:00
parent 2598138ece
commit 2258ec6bc9
4 changed files with 9 additions and 9 deletions

6
lvm.c
View File

@@ -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;