aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-10-02 13:45:03 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-10-02 13:45:03 -0300
commit15462edb0ff86bf1904011b29635420451cab2c5 (patch)
tree9a626d34736b830f83fda3f1b2f3342990a05b1f /ltests.c
parent6f936bc7931662d0460d47ad73eca308ba5fab2f (diff)
downloadlua-15462edb0ff86bf1904011b29635420451cab2c5.tar.gz
lua-15462edb0ff86bf1904011b29635420451cab2c5.tar.bz2
lua-15462edb0ff86bf1904011b29635420451cab2c5.zip
new definitions for closure structures
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ltests.c b/ltests.c
index a33a9638..03d65657 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 1.88 2001/07/12 18:11:58 roberto Exp $ 2** $Id: ltests.c,v 1.91 2001/09/07 17:39:10 roberto Exp $
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*/
@@ -165,7 +165,7 @@ static int listcode (lua_State *L) {
165 Proto *p; 165 Proto *p;
166 luaL_arg_check(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1), 166 luaL_arg_check(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1),
167 1, l_s("Lua function expected")); 167 1, l_s("Lua function expected"));
168 p = clvalue(luaA_index(L, 1))->u.l.p; 168 p = clvalue(luaA_index(L, 1))->l.p;
169 lua_newtable(L); 169 lua_newtable(L);
170 setnameval(L, l_s("maxstack"), p->maxstacksize); 170 setnameval(L, l_s("maxstack"), p->maxstacksize);
171 setnameval(L, l_s("numparams"), p->numparams); 171 setnameval(L, l_s("numparams"), p->numparams);
@@ -184,7 +184,7 @@ static int listk (lua_State *L) {
184 int i; 184 int i;
185 luaL_arg_check(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1), 185 luaL_arg_check(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1),
186 1, l_s("Lua function expected")); 186 1, l_s("Lua function expected"));
187 p = clvalue(luaA_index(L, 1))->u.l.p; 187 p = clvalue(luaA_index(L, 1))->l.p;
188 lua_newtable(L); 188 lua_newtable(L);
189 for (i=0; i<p->sizek; i++) { 189 for (i=0; i<p->sizek; i++) {
190 lua_pushnumber(L, i+1); 190 lua_pushnumber(L, i+1);
@@ -202,7 +202,7 @@ static int listlocals (lua_State *L) {
202 const l_char *name; 202 const l_char *name;
203 luaL_arg_check(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1), 203 luaL_arg_check(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1),
204 1, l_s("Lua function expected")); 204 1, l_s("Lua function expected"));
205 p = clvalue(luaA_index(L, 1))->u.l.p; 205 p = clvalue(luaA_index(L, 1))->l.p;
206 while ((name = luaF_getlocalname(p, ++i, pc)) != NULL) 206 while ((name = luaF_getlocalname(p, ++i, pc)) != NULL)
207 lua_pushstring(L, name); 207 lua_pushstring(L, name);
208 return i-1; 208 return i-1;