no more pseudoindex LUA_GLOBALSINDEX; global table now accessible

through registry
This commit is contained in:
Roberto Ierusalimschy
2009-12-22 13:32:50 -02:00
parent 3cb343efd6
commit f84b575cfa
12 changed files with 63 additions and 53 deletions

4
ldo.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: ldo.c,v 2.77 2009/12/17 12:26:09 roberto Exp roberto $
** $Id: ldo.c,v 2.78 2009/12/17 12:28:57 roberto Exp roberto $
** Stack and Call structure of Lua
** See Copyright Notice in lua.h
*/
@@ -619,7 +619,7 @@ static void f_parser (lua_State *L, void *ud) {
: luaY_parser(L, p->z, &p->buff, &p->varl, p->name);
setptvalue2s(L, L->top, tf);
incr_top(L);
cl = luaF_newLclosure(L, tf->sizeupvalues, hvalue(&G(L)->l_gt));
cl = luaF_newLclosure(L, tf->sizeupvalues, G(L)->l_gt);
cl->l.p = tf;
setclvalue(L, L->top - 1, cl);
for (i = 0; i < tf->sizeupvalues; i++) /* initialize upvalues */