diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-03-25 14:47:14 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-03-25 14:47:14 -0300 |
commit | 801aaf37b14a1fad5bb49c9a4200d25680152471 (patch) | |
tree | e3cc5cdebac6d503091f4ba16444f8ecfa8dfdb2 /ltests.c | |
parent | 00af2faae71e6388ee61ef18b2c5902a42e9bc27 (diff) | |
download | lua-801aaf37b14a1fad5bb49c9a4200d25680152471.tar.gz lua-801aaf37b14a1fad5bb49c9a4200d25680152471.tar.bz2 lua-801aaf37b14a1fad5bb49c9a4200d25680152471.zip |
simpler implementation for line information
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 1.112 2002/03/14 18:01:52 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 1.113 2002/03/20 12:54:08 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 | */ |
@@ -144,7 +144,7 @@ static char *buildop (Proto *p, int pc, char *buff) { | |||
144 | Instruction i = p->code[pc]; | 144 | Instruction i = p->code[pc]; |
145 | OpCode o = GET_OPCODE(i); | 145 | OpCode o = GET_OPCODE(i); |
146 | const char *name = luaP_opnames[o]; | 146 | const char *name = luaP_opnames[o]; |
147 | int line = luaG_getline(p->lineinfo, pc, 1, NULL); | 147 | int line = p->lineinfo[pc]; |
148 | sprintf(buff, "(%4d) %4d - ", line, pc); | 148 | sprintf(buff, "(%4d) %4d - ", line, pc); |
149 | switch (getOpMode(o)) { | 149 | switch (getOpMode(o)) { |
150 | case iABC: | 150 | case iABC: |