diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-06-04 10:06:15 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-06-04 10:06:15 -0300 |
commit | 545f43065ff8fa20e5f8254e6270d00694b847dd (patch) | |
tree | 22660d6087cd7c5b342652d6e3ee555df58fdabd /ldo.c | |
parent | 3819c30e5553b98ceb7d8d2da20c9da25cbdc62a (diff) | |
download | lua-545f43065ff8fa20e5f8254e6270d00694b847dd.tar.gz lua-545f43065ff8fa20e5f8254e6270d00694b847dd.tar.bz2 lua-545f43065ff8fa20e5f8254e6270d00694b847dd.zip |
'luaF_newLclosure' gets prototype of new closure as argument
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 5 |
1 files changed, 2 insertions, 3 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); |