aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ltests.c b/ltests.c
index 63e3cc5e..05d2ab16 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 1.164 2003/10/02 20:31:17 roberto Exp roberto $ 2** $Id: ltests.c,v 1.165 2003/10/07 20:13:41 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*/
@@ -207,11 +207,10 @@ static int listk (lua_State *L) {
207 luaL_argcheck(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1), 207 luaL_argcheck(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1),
208 1, "Lua function expected"); 208 1, "Lua function expected");
209 p = clvalue(func_at(L, 1))->l.p; 209 p = clvalue(func_at(L, 1))->l.p;
210 lua_newtable(L); 210 lua_createtable(L, p->sizek, 0);
211 for (i=0; i<p->sizek; i++) { 211 for (i=0; i<p->sizek; i++) {
212 lua_pushinteger(L, i+1);
213 luaA_pushobject(L, p->k+i); 212 luaA_pushobject(L, p->k+i);
214 lua_settable(L, -3); 213 lua_rawseti(L, -2, i+1);
215 } 214 }
216 return 1; 215 return 1;
217} 216}
@@ -236,7 +235,7 @@ static int listlocals (lua_State *L) {
236 235
237 236
238static int get_limits (lua_State *L) { 237static int get_limits (lua_State *L) {
239 lua_newtable(L); 238 lua_createtable(L, 0, 5);
240 setnameval(L, "BITS_INT", BITS_INT); 239 setnameval(L, "BITS_INT", BITS_INT);
241 setnameval(L, "LFPF", LFIELDS_PER_FLUSH); 240 setnameval(L, "LFPF", LFIELDS_PER_FLUSH);
242 setnameval(L, "MAXVARS", MAXVARS); 241 setnameval(L, "MAXVARS", MAXVARS);