mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
update lua 5.5.1
This commit is contained in:
@@ -392,7 +392,8 @@ static void checkHeader (LoadState *S) {
|
||||
/*
|
||||
** Load precompiled chunk.
|
||||
*/
|
||||
LClosure *luaU_undump (lua_State *L, ZIO *Z, const char *name, int fixed) {
|
||||
LClosure *luaU_undump (lua_State *L, ZIO *Z, Table *anchor, const char *name,
|
||||
int fixed) {
|
||||
LoadState S;
|
||||
LClosure *cl;
|
||||
if (*name == '@' || *name == '=')
|
||||
@@ -405,20 +406,16 @@ LClosure *luaU_undump (lua_State *L, ZIO *Z, const char *name, int fixed) {
|
||||
S.fixed = cast_byte(fixed);
|
||||
S.offset = 1; /* fist byte was already read */
|
||||
checkHeader(&S);
|
||||
cl = luaF_newLclosure(L, loadByte(&S));
|
||||
setclLvalue2s(L, L->top.p, cl);
|
||||
luaD_inctop(L);
|
||||
S.h = luaH_new(L); /* create list of saved strings */
|
||||
S.h = anchor;
|
||||
S.nstr = 0;
|
||||
sethvalue2s(L, L->top.p, S.h); /* anchor it */
|
||||
luaD_inctop(L);
|
||||
cl = luaF_newLclosure(L, loadByte(&S));
|
||||
luaD_anchorobj(L, anchor, obj2gco(cl));
|
||||
cl->p = luaF_newproto(L);
|
||||
luaC_objbarrier(L, cl, cl->p);
|
||||
loadFunction(&S, cl->p);
|
||||
if (cl->nupvalues != cl->p->sizeupvalues)
|
||||
error(&S, "corrupted chunk");
|
||||
luai_verifycode(L, cl->p);
|
||||
L->top.p--; /* pop table */
|
||||
return cl;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user