aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-05-13 10:10:04 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-05-13 10:10:04 -0300
commitc18fe57e543dabb828ad64dc2d45d66fa0fae429 (patch)
treefc2d7a417037fcb4fd8e8e1a0d3dbdb1221e0e66 /ltests.c
parentaf19d556355b6e79296811cb18fe511f8784b8f1 (diff)
downloadlua-c18fe57e543dabb828ad64dc2d45d66fa0fae429.tar.gz
lua-c18fe57e543dabb828ad64dc2d45d66fa0fae429.tar.bz2
lua-c18fe57e543dabb828ad64dc2d45d66fa0fae429.zip
quick-and-dirty function to print code (for debugging Lua)
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/ltests.c b/ltests.c
index feef9e52..69b82dd7 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 1.119 2002/05/02 13:06:20 roberto Exp roberto $ 2** $Id: ltests.c,v 1.120 2002/05/06 19:05:10 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*/
@@ -162,6 +162,18 @@ static char *buildop (Proto *p, int pc, char *buff) {
162} 162}
163 163
164 164
165#if 0
166void luaI_printcode (Proto *pt, int size) {
167 int pc;
168 for (pc=0; pc<size; pc++) {
169 char buff[100];
170 printf("%s\n", buildop(pt, pc, buff));
171 }
172printf("-------\n");
173}
174#endif
175
176
165static int listcode (lua_State *L) { 177static int listcode (lua_State *L) {
166 int pc; 178 int pc;
167 Proto *p; 179 Proto *p;