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-89b56e7d84d84de58fcc9d540c2003c6c2f8c134.tar.gz lua-89b56e7d84d84de58fcc9d540c2003c6c2f8c134.tar.bz2 lua-89b56e7d84d84de58fcc9d540c2003c6c2f8c134.zip | |
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 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lundump.c,v 2.38 2014/06/18 13:19:17 roberto Exp roberto $ | 2 | ** $Id: lundump.c,v 2.39 2014/06/18 18:35:43 roberto Exp roberto $ |
| 3 | ** load precompiled Lua chunks | 3 | ** load precompiled Lua chunks |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -248,10 +248,10 @@ static void checkHeader (LoadState *S) { | |||
| 248 | /* | 248 | /* |
| 249 | ** load precompiled chunk | 249 | ** load precompiled chunk |
| 250 | */ | 250 | */ |
| 251 | Closure *luaU_undump(lua_State *L, ZIO *Z, Mbuffer *buff, | 251 | LClosure *luaU_undump(lua_State *L, ZIO *Z, Mbuffer *buff, |
| 252 | const char *name) { | 252 | const char *name) { |
| 253 | LoadState S; | 253 | LoadState S; |
| 254 | Closure *cl; | 254 | LClosure *cl; |
| 255 | if (*name == '@' || *name == '=') | 255 | if (*name == '@' || *name == '=') |
| 256 | S.name = name + 1; | 256 | S.name = name + 1; |
| 257 | else if (*name == LUA_SIGNATURE[0]) | 257 | else if (*name == LUA_SIGNATURE[0]) |
| @@ -265,10 +265,10 @@ Closure *luaU_undump(lua_State *L, ZIO *Z, Mbuffer *buff, | |||
| 265 | cl = luaF_newLclosure(L, LoadByte(&S)); | 265 | cl = luaF_newLclosure(L, LoadByte(&S)); |
| 266 | setclLvalue(L, L->top, cl); | 266 | setclLvalue(L, L->top, cl); |
| 267 | incr_top(L); | 267 | incr_top(L); |
| 268 | cl->l.p = luaF_newproto(L); | 268 | cl->p = luaF_newproto(L); |
| 269 | LoadFunction(&S, cl->l.p, NULL); | 269 | LoadFunction(&S, cl->p, NULL); |
| 270 | lua_assert(cl->l.nupvalues == cl->l.p->sizeupvalues); | 270 | lua_assert(cl->nupvalues == cl->p->sizeupvalues); |
| 271 | luai_verifycode(L, buff, cl->l.p); | 271 | luai_verifycode(L, buff, cl->p); |
| 272 | return cl; | 272 | return cl; |
| 273 | } | 273 | } |
| 274 | 274 | ||
