no more one environment per thread: all threads share a single global

environment
This commit is contained in:
Roberto Ierusalimschy
2009-10-23 17:12:19 -02:00
parent f5073de0a7
commit 5bc91c6405
7 changed files with 27 additions and 47 deletions

4
ldo.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: ldo.c,v 2.68 2009/09/28 16:32:50 roberto Exp roberto $
** $Id: ldo.c,v 2.69 2009/10/11 20:02:19 roberto Exp roberto $
** Stack and Call structure of Lua
** See Copyright Notice in lua.h
*/
@@ -579,7 +579,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(gt(L)));
cl = luaF_newLclosure(L, tf->sizeupvalues, hvalue(&G(L)->l_gt));
cl->l.p = tf;
setclvalue(L, L->top - 1, cl);
for (i = 0; i < tf->sizeupvalues; i++) /* initialize upvalues */