quick-and-dirty function to print code (for debugging Lua)
This commit is contained in:
14
ltests.c
14
ltests.c
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: ltests.c,v 1.119 2002/05/02 13:06:20 roberto Exp roberto $
|
** $Id: ltests.c,v 1.120 2002/05/06 19:05:10 roberto Exp roberto $
|
||||||
** Internal Module for Debugging of the Lua Implementation
|
** Internal Module for Debugging of the Lua Implementation
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@@ -162,6 +162,18 @@ static char *buildop (Proto *p, int pc, char *buff) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
void luaI_printcode (Proto *pt, int size) {
|
||||||
|
int pc;
|
||||||
|
for (pc=0; pc<size; pc++) {
|
||||||
|
char buff[100];
|
||||||
|
printf("%s\n", buildop(pt, pc, buff));
|
||||||
|
}
|
||||||
|
printf("-------\n");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static int listcode (lua_State *L) {
|
static int listcode (lua_State *L) {
|
||||||
int pc;
|
int pc;
|
||||||
Proto *p;
|
Proto *p;
|
||||||
|
|||||||
Reference in New Issue
Block a user