From abdbe883a86bbc7fbf1d1bfc50756e1b42fc45b5 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 7 Sep 2001 14:39:10 -0300 Subject: first implementation of unrestricted static scoping --- ltests.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index 35c6f027..a33a9638 100644 --- a/ltests.c +++ b/ltests.c @@ -165,7 +165,7 @@ static int listcode (lua_State *L) { Proto *p; luaL_arg_check(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1), 1, l_s("Lua function expected")); - p = clvalue(luaA_index(L, 1))->f.l; + p = clvalue(luaA_index(L, 1))->u.l.p; lua_newtable(L); setnameval(L, l_s("maxstack"), p->maxstacksize); setnameval(L, l_s("numparams"), p->numparams); @@ -184,7 +184,7 @@ static int listk (lua_State *L) { int i; luaL_arg_check(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1), 1, l_s("Lua function expected")); - p = clvalue(luaA_index(L, 1))->f.l; + p = clvalue(luaA_index(L, 1))->u.l.p; lua_newtable(L); for (i=0; isizek; i++) { lua_pushnumber(L, i+1); @@ -202,7 +202,7 @@ static int listlocals (lua_State *L) { const l_char *name; luaL_arg_check(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1), 1, l_s("Lua function expected")); - p = clvalue(luaA_index(L, 1))->f.l; + p = clvalue(luaA_index(L, 1))->u.l.p; while ((name = luaF_getlocalname(p, ++i, pc)) != NULL) lua_pushstring(L, name); return i-1; -- cgit v1.2.3-55-g6feb