|
|
@ -767,14 +767,14 @@ static void f_parser (lua_State *L, void *ud) {
|
|
|
|
LClosure *cl;
|
|
|
|
LClosure *cl;
|
|
|
|
struct SParser *p = cast(struct SParser *, ud);
|
|
|
|
struct SParser *p = cast(struct SParser *, ud);
|
|
|
|
int c = zgetc(p->z); /* read first character */
|
|
|
|
int c = zgetc(p->z); /* read first character */
|
|
|
|
if (c == LUA_SIGNATURE[0]) {
|
|
|
|
// if (c == LUA_SIGNATURE[0]) {
|
|
|
|
checkmode(L, p->mode, "binary");
|
|
|
|
// checkmode(L, p->mode, "binary");
|
|
|
|
cl = luaU_undump(L, p->z, p->name);
|
|
|
|
// cl = luaU_undump(L, p->z, p->name);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
else {
|
|
|
|
// else {
|
|
|
|
checkmode(L, p->mode, "text");
|
|
|
|
checkmode(L, p->mode, "text");
|
|
|
|
cl = luaY_parser(L, p->z, &p->buff, &p->dyd, p->name, c);
|
|
|
|
cl = luaY_parser(L, p->z, &p->buff, &p->dyd, p->name, c);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
lua_assert(cl->nupvalues == cl->p->sizeupvalues);
|
|
|
|
lua_assert(cl->nupvalues == cl->p->sizeupvalues);
|
|
|
|
luaF_initupvals(L, cl);
|
|
|
|
luaF_initupvals(L, cl);
|
|
|
|
}
|
|
|
|
}
|
|
|
|