From f90bc248b3c3c18941a96038b2a7517ad571d8b1 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 8 Aug 2000 15:26:05 -0300 Subject: new structure for line information --- ltests.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index 40ba3f4b..677f7c8d 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 1.29 2000/06/30 19:17:08 roberto Exp roberto $ +** $Id: ltests.c,v 1.30 2000/08/04 19:38:35 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -16,6 +16,7 @@ #include "lapi.h" #include "lauxlib.h" #include "lcode.h" +#include "ldebug.h" #include "ldo.h" #include "lfunc.h" #include "lmem.h" @@ -68,9 +69,9 @@ static int pushop (Proto *p, int pc) { Instruction i = p->code[pc]; OpCode o = GET_OPCODE(i); const char *name = instrname[o]; - int *line = p->lines; - if (line) - sprintf(buff, "%5d - ", line[pc]); + int *lineinfo = p->lineinfo; + if (lineinfo) + sprintf(buff, "%5d - ", luaG_getline(lineinfo, pc, 1, NULL)); else strcpy(buff, " "); switch ((enum Mode)luaK_opproperties[o].mode) { -- cgit v1.2.3-55-g6feb