aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ltests.c b/ltests.c
index 40ba3f4b..677f7c8d 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 1.29 2000/06/30 19:17:08 roberto Exp roberto $ 2** $Id: ltests.c,v 1.30 2000/08/04 19:38:35 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*/
@@ -16,6 +16,7 @@
16#include "lapi.h" 16#include "lapi.h"
17#include "lauxlib.h" 17#include "lauxlib.h"
18#include "lcode.h" 18#include "lcode.h"
19#include "ldebug.h"
19#include "ldo.h" 20#include "ldo.h"
20#include "lfunc.h" 21#include "lfunc.h"
21#include "lmem.h" 22#include "lmem.h"
@@ -68,9 +69,9 @@ static int pushop (Proto *p, int pc) {
68 Instruction i = p->code[pc]; 69 Instruction i = p->code[pc];
69 OpCode o = GET_OPCODE(i); 70 OpCode o = GET_OPCODE(i);
70 const char *name = instrname[o]; 71 const char *name = instrname[o];
71 int *line = p->lines; 72 int *lineinfo = p->lineinfo;
72 if (line) 73 if (lineinfo)
73 sprintf(buff, "%5d - ", line[pc]); 74 sprintf(buff, "%5d - ", luaG_getline(lineinfo, pc, 1, NULL));
74 else 75 else
75 strcpy(buff, " "); 76 strcpy(buff, " ");
76 switch ((enum Mode)luaK_opproperties[o].mode) { 77 switch ((enum Mode)luaK_opproperties[o].mode) {