diff options
-rw-r--r-- | ldo.c | 5 | ||||
-rw-r--r-- | lfunc.h | 4 |
2 files changed, 4 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 2.86 2010/04/18 13:22:48 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.87 2010/05/05 18:49:56 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 | */ |
@@ -630,8 +630,7 @@ static void f_parser (lua_State *L, void *ud) { | |||
630 | : luaY_parser(L, p->z, &p->buff, &p->varl, p->name); | 630 | : luaY_parser(L, p->z, &p->buff, &p->varl, p->name); |
631 | setptvalue2s(L, L->top, tf); | 631 | setptvalue2s(L, L->top, tf); |
632 | incr_top(L); | 632 | incr_top(L); |
633 | cl = luaF_newLclosure(L, tf->sizeupvalues); | 633 | cl = luaF_newLclosure(L, tf); |
634 | cl->l.p = tf; | ||
635 | setclvalue(L, L->top - 1, cl); | 634 | setclvalue(L, L->top - 1, cl); |
636 | for (i = 0; i < tf->sizeupvalues; i++) /* initialize upvalues */ | 635 | for (i = 0; i < tf->sizeupvalues; i++) /* initialize upvalues */ |
637 | cl->l.upvals[i] = luaF_newupval(L); | 636 | cl->l.upvals[i] = luaF_newupval(L); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lfunc.h,v 2.4 2005/04/25 19:24:10 roberto Exp roberto $ | 2 | ** $Id: lfunc.h,v 2.5 2010/03/26 20:58:11 roberto Exp roberto $ |
3 | ** Auxiliary functions to manipulate prototypes and closures | 3 | ** Auxiliary functions to manipulate prototypes and closures |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | LUAI_FUNC Proto *luaF_newproto (lua_State *L); | 21 | LUAI_FUNC Proto *luaF_newproto (lua_State *L); |
22 | LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems); | 22 | LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems); |
23 | LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems); | 23 | LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, Proto *p); |
24 | LUAI_FUNC UpVal *luaF_newupval (lua_State *L); | 24 | LUAI_FUNC UpVal *luaF_newupval (lua_State *L); |
25 | LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level); | 25 | LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level); |
26 | LUAI_FUNC void luaF_close (lua_State *L, StkId level); | 26 | LUAI_FUNC void luaF_close (lua_State *L, StkId level); |