aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ltests.c b/ltests.c
index 82d6463a..ac548a95 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 2.244 2018/06/11 14:19:50 roberto Exp roberto $ 2** $Id: ltests.c,v 2.246 2018/06/26 18:00:55 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*/
@@ -27,6 +27,7 @@
27#include "lfunc.h" 27#include "lfunc.h"
28#include "lmem.h" 28#include "lmem.h"
29#include "lopcodes.h" 29#include "lopcodes.h"
30#include "lopnames.h"
30#include "lstate.h" 31#include "lstate.h"
31#include "lstring.h" 32#include "lstring.h"
32#include "ltable.h" 33#include "ltable.h"
@@ -523,7 +524,7 @@ int lua_checkmemory (lua_State *L) {
523static char *buildop (Proto *p, int pc, char *buff) { 524static char *buildop (Proto *p, int pc, char *buff) {
524 Instruction i = p->code[pc]; 525 Instruction i = p->code[pc];
525 OpCode o = GET_OPCODE(i); 526 OpCode o = GET_OPCODE(i);
526 const char *name = luaP_opnames[o]; 527 const char *name = opnames[o];
527 int line = luaG_getfuncline(p, pc); 528 int line = luaG_getfuncline(p, pc);
528 sprintf(buff, "(%4d) %4d - ", line, pc); 529 sprintf(buff, "(%4d) %4d - ", line, pc);
529 switch (getOpMode(o)) { 530 switch (getOpMode(o)) {
@@ -599,7 +600,7 @@ static int printcode (lua_State *L) {
599 printf("numparams: %d\n", p->numparams); 600 printf("numparams: %d\n", p->numparams);
600 for (pc=0; pc<p->sizecode; pc++) { 601 for (pc=0; pc<p->sizecode; pc++) {
601 char buff[100]; 602 char buff[100];
602 printf("%d\t%s\n", pc + 1, buildop(p, pc, buff)); 603 printf("%s\n", buildop(p, pc, buff));
603 } 604 }
604 return 0; 605 return 0;
605} 606}