diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lua51')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua51/ldebug.c | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua51/ldebug.h | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua51/lvm.c | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua51/print.c | 2 |
4 files changed, 6 insertions, 8 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua51/ldebug.c b/Build/source/texk/web2c/luatexdir/lua51/ldebug.c index abb3da4a021..8d8bef476ff 100644 --- a/Build/source/texk/web2c/luatexdir/lua51/ldebug.c +++ b/Build/source/texk/web2c/luatexdir/lua51/ldebug.c @@ -28,7 +28,7 @@ #include "ltm.h" #include "lvm.h" -#include <stdio.h> + static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name); @@ -37,8 +37,6 @@ static int currentpc (lua_State *L, CallInfo *ci) { if (!isLua(ci)) return -1; /* function is not a Lua function? */ if (ci == L->ci) ci->savedpc = L->savedpc; - if (ci->savedpc==NULL) - return -1; return pcRel(ci->savedpc, ci_func(ci)->l.p); } @@ -48,7 +46,7 @@ static int currentline (lua_State *L, 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 GETLINE(ci_func(ci)->l.p, pc); } diff --git a/Build/source/texk/web2c/luatexdir/lua51/ldebug.h b/Build/source/texk/web2c/luatexdir/lua51/ldebug.h index ba28a97248e..00b229f5b31 100644 --- a/Build/source/texk/web2c/luatexdir/lua51/ldebug.h +++ b/Build/source/texk/web2c/luatexdir/lua51/ldebug.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 GETLINE(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0) #define resethookcount(L) (L->hookcount = L->basehookcount) diff --git a/Build/source/texk/web2c/luatexdir/lua51/lvm.c b/Build/source/texk/web2c/luatexdir/lua51/lvm.c index ee3256ab94d..8b8624cf338 100644 --- a/Build/source/texk/web2c/luatexdir/lua51/lvm.c +++ b/Build/source/texk/web2c/luatexdir/lua51/lvm.c @@ -68,10 +68,10 @@ static void traceexec (lua_State *L, const Instruction *pc) { if (mask & LUA_MASKLINE) { Proto *p = ci_func(L->ci)->l.p; int npc = pcRel(pc, p); - int newline = getline(p, npc); + int newline = GETLINE(p, npc); /* call linehook when enter a new function, when jump back (loop), or when enter a new line */ - if (npc == 0 || pc <= oldpc || newline != getline(p, pcRel(oldpc, p))) + if (npc == 0 || pc <= oldpc || newline != GETLINE(p, pcRel(oldpc, p))) luaD_callhook(L, LUA_HOOKLINE, newline); } } diff --git a/Build/source/texk/web2c/luatexdir/lua51/print.c b/Build/source/texk/web2c/luatexdir/lua51/print.c index e240cfc3c60..84e3166bf11 100644 --- a/Build/source/texk/web2c/luatexdir/lua51/print.c +++ b/Build/source/texk/web2c/luatexdir/lua51/print.c @@ -84,7 +84,7 @@ static void PrintCode(const Proto* f) int c=GETARG_C(i); int bx=GETARG_Bx(i); int sbx=GETARG_sBx(i); - int line=getline(f,pc); + int line=GETLINE(f,pc); printf("\t%d\t",pc+1); if (line>0) printf("[%d]\t",line); else printf("[-]\t"); printf("%-9s\t",luaP_opnames[o]); |