diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-06-19 15:27:20 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-06-19 15:27:20 -0300 |
commit | 89b56e7d84d84de58fcc9d540c2003c6c2f8c134 (patch) | |
tree | 85ba9c3aa3cdb5ff57fd4f82bf322fb2e75e7292 /lundump.c | |
parent | 14929f5764a7990dfb62c8792cfdfe03c061da21 (diff) | |
download | lua-github-89b56e7d84d84de58fcc9d540c2003c6c2f8c134.tar.gz |
more precision between closure types ('LClosure' x 'CClosure')
Diffstat (limited to 'lundump.c')
-rw-r--r-- | lundump.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -1,5 +1,5 @@ /* -** $Id: lundump.c,v 2.38 2014/06/18 13:19:17 roberto Exp roberto $ +** $Id: lundump.c,v 2.39 2014/06/18 18:35:43 roberto Exp roberto $ ** load precompiled Lua chunks ** See Copyright Notice in lua.h */ @@ -248,10 +248,10 @@ static void checkHeader (LoadState *S) { /* ** load precompiled chunk */ -Closure *luaU_undump(lua_State *L, ZIO *Z, Mbuffer *buff, - const char *name) { +LClosure *luaU_undump(lua_State *L, ZIO *Z, Mbuffer *buff, + const char *name) { LoadState S; - Closure *cl; + LClosure *cl; if (*name == '@' || *name == '=') S.name = name + 1; else if (*name == LUA_SIGNATURE[0]) @@ -265,10 +265,10 @@ Closure *luaU_undump(lua_State *L, ZIO *Z, Mbuffer *buff, cl = luaF_newLclosure(L, LoadByte(&S)); setclLvalue(L, L->top, cl); incr_top(L); - cl->l.p = luaF_newproto(L); - LoadFunction(&S, cl->l.p, NULL); - lua_assert(cl->l.nupvalues == cl->l.p->sizeupvalues); - luai_verifycode(L, buff, cl->l.p); + cl->p = luaF_newproto(L); + LoadFunction(&S, cl->p, NULL); + lua_assert(cl->nupvalues == cl->p->sizeupvalues); + luai_verifycode(L, buff, cl->p); return cl; } |