diff options
| -rw-r--r-- | ltests.c | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -142,7 +142,8 @@ static char *buildop (Proto *p, int pc, char *buff) { | |||
| 142 | Instruction i = p->code[pc]; | 142 | Instruction i = p->code[pc]; |
| 143 | OpCode o = GET_OPCODE(i); | 143 | OpCode o = GET_OPCODE(i); |
| 144 | const char *name = luaP_opnames[o]; | 144 | const char *name = luaP_opnames[o]; |
| 145 | sprintf(buff, "%4d - ", pc); | 145 | int line = luaG_getline(p->lineinfo, pc, 1, NULL); |
| 146 | sprintf(buff, "(%4d) %4d - ", line, pc); | ||
| 146 | switch (getOpMode(o)) { | 147 | switch (getOpMode(o)) { |
| 147 | case iABC: | 148 | case iABC: |
| 148 | sprintf(buff+strlen(buff), "%-12s%4d %4d %4d", name, | 149 | sprintf(buff+strlen(buff), "%-12s%4d %4d %4d", name, |
| @@ -575,6 +576,9 @@ static int testC (lua_State *L) { | |||
| 575 | else if EQ("insert") { | 576 | else if EQ("insert") { |
| 576 | lua_insert(L, getnum); | 577 | lua_insert(L, getnum); |
| 577 | } | 578 | } |
| 579 | else if EQ("replace") { | ||
| 580 | lua_replace(L, getnum); | ||
| 581 | } | ||
| 578 | else if EQ("gettable") { | 582 | else if EQ("gettable") { |
| 579 | lua_gettable(L, getnum); | 583 | lua_gettable(L, getnum); |
| 580 | } | 584 | } |
