aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ltests.c b/ltests.c
index 7762abb3..5ce089b9 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 1.14 2000/04/12 19:56:50 roberto Exp roberto $ 2** $Id: ltests.c,v 1.15 2000/04/13 16:51:01 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*/
@@ -55,7 +55,7 @@ static void setnameval (lua_State *L, lua_Object t, const char *name, int val) {
55 55
56 56
57 57
58static int printop (lua_State *L, Instruction i) { 58static int pushop (lua_State *L, Instruction i) {
59 char buff[100]; 59 char buff[100];
60 switch (GET_OPCODE(i)) { 60 switch (GET_OPCODE(i)) {
61 case OP_END: O("END"); lua_pushstring(L, buff); return 0; 61 case OP_END: O("END"); lua_pushstring(L, buff); return 0;
@@ -76,7 +76,7 @@ static int printop (lua_State *L, Instruction i) {
76 case OP_GETINDEXED: U("GETINDEXED"); break; 76 case OP_GETINDEXED: U("GETINDEXED"); break;
77 case OP_PUSHSELF: U("PUSHSELF"); break; 77 case OP_PUSHSELF: U("PUSHSELF"); break;
78 case OP_CREATETABLE: U("CREATETABLE"); break; 78 case OP_CREATETABLE: U("CREATETABLE"); break;
79 case OP_SETLOCAL: AB("SETLOCAL"); break; 79 case OP_SETLOCAL: U("SETLOCAL"); break;
80 case OP_SETGLOBAL: U("SETGLOBAL"); break; 80 case OP_SETGLOBAL: U("SETGLOBAL"); break;
81 case OP_SETTABLE: AB("SETTABLE"); break; 81 case OP_SETTABLE: AB("SETTABLE"); break;
82 case OP_SETLIST: AB("SETLIST"); break; 82 case OP_SETLIST: AB("SETLIST"); break;
@@ -111,7 +111,7 @@ static int printop (lua_State *L, Instruction i) {
111 return 1; 111 return 1;
112} 112}
113 113
114static void printcode (lua_State *L) { 114static void listcode (lua_State *L) {
115 lua_Object o = luaL_nonnullarg(L, 1); 115 lua_Object o = luaL_nonnullarg(L, 1);
116 lua_Object t = lua_createtable(L); 116 lua_Object t = lua_createtable(L);
117 Instruction *pc; 117 Instruction *pc;
@@ -125,7 +125,7 @@ static void printcode (lua_State *L) {
125 do { 125 do {
126 lua_pushobject(L, t); 126 lua_pushobject(L, t);
127 lua_pushnumber(L, pc - p->code + 1); 127 lua_pushnumber(L, pc - p->code + 1);
128 res = printop(L, *pc++); 128 res = pushop(L, *pc++);
129 lua_settable(L); 129 lua_settable(L);
130 } while (res); 130 } while (res);
131 lua_pushobject(L, t); 131 lua_pushobject(L, t);
@@ -402,7 +402,7 @@ static void testC (lua_State *L) {
402static const struct luaL_reg tests_funcs[] = { 402static const struct luaL_reg tests_funcs[] = {
403 {"hash", hash_query}, 403 {"hash", hash_query},
404 {"limits", get_limits}, 404 {"limits", get_limits},
405 {"printcode", printcode}, 405 {"listcode", listcode},
406 {"querystr", string_query}, 406 {"querystr", string_query},
407 {"querytab", table_query}, 407 {"querytab", table_query},
408 {"testC", testC}, 408 {"testC", testC},