diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-02-18 10:40:02 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-02-18 10:40:02 -0200 |
| commit | 7d45a5f48ff32a4e09a1734de23823943d6a6b28 (patch) | |
| tree | de7bef1faf37d9b639928e5269e89d7112b5b6fa /ldo.c | |
| parent | 73d764024451c24bc43b8e5102fe90974a86b7f4 (diff) | |
| download | lua-7d45a5f48ff32a4e09a1734de23823943d6a6b28.tar.gz lua-7d45a5f48ff32a4e09a1734de23823943d6a6b28.tar.bz2 lua-7d45a5f48ff32a4e09a1734de23823943d6a6b28.zip | |
C functions and userdata also have environments
Diffstat (limited to 'ldo.c')
| -rw-r--r-- | ldo.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldo.c,v 2.12 2004/12/01 15:52:54 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.13 2004/12/03 20:35:33 roberto Exp roberto $ |
| 3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -474,7 +474,7 @@ static void f_parser (lua_State *L, void *ud) { | |||
| 474 | luaC_checkGC(L); | 474 | luaC_checkGC(L); |
| 475 | tf = ((c == LUA_SIGNATURE[0]) ? luaU_undump : luaY_parser)(L, p->z, | 475 | tf = ((c == LUA_SIGNATURE[0]) ? luaU_undump : luaY_parser)(L, p->z, |
| 476 | &p->buff, p->name); | 476 | &p->buff, p->name); |
| 477 | cl = luaF_newLclosure(L, tf->nups, gt(L)); | 477 | cl = luaF_newLclosure(L, tf->nups, hvalue(gt(L))); |
| 478 | cl->l.p = tf; | 478 | cl->l.p = tf; |
| 479 | for (i = 0; i < tf->nups; i++) /* initialize eventual upvalues */ | 479 | for (i = 0; i < tf->nups; i++) /* initialize eventual upvalues */ |
| 480 | cl->l.upvals[i] = luaF_newupval(L); | 480 | cl->l.upvals[i] = luaF_newupval(L); |
