mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
Merge pull request #483 from t0350/master
bugfix, error when use lua apicheck
This commit is contained in:
@@ -118,7 +118,7 @@ LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar) {
|
|||||||
|
|
||||||
|
|
||||||
static const char *upvalname (Proto *p, int uv) {
|
static const char *upvalname (Proto *p, int uv) {
|
||||||
TString *s = check_exp(uv < p->sizeupvalues, p->sp->upvalues[uv].name);
|
TString *s = check_exp(uv < p->sp->sizeupvalues, p->sp->upvalues[uv].name);
|
||||||
if (s == NULL) return "?";
|
if (s == NULL) return "?";
|
||||||
else return getstr(s);
|
else return getstr(s);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -768,7 +768,7 @@ static void f_parser (lua_State *L, void *ud) {
|
|||||||
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->sp->sizeupvalues);
|
||||||
luaF_initupvals(L, cl);
|
luaF_initupvals(L, cl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1597,7 +1597,7 @@ static void statement (LexState *ls) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lua_assert(ls->fs->f->maxstacksize >= ls->fs->freereg &&
|
lua_assert(ls->fs->f->sp->maxstacksize >= ls->fs->freereg &&
|
||||||
ls->fs->freereg >= ls->fs->nactvar);
|
ls->fs->freereg >= ls->fs->nactvar);
|
||||||
ls->fs->freereg = ls->fs->nactvar; /* free registers */
|
ls->fs->freereg = ls->fs->nactvar; /* free registers */
|
||||||
leavelevel(ls);
|
leavelevel(ls);
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ LClosure *luaU_undump(lua_State *L, ZIO *Z, const char *name) {
|
|||||||
luaD_inctop(L);
|
luaD_inctop(L);
|
||||||
cl->p = luaF_newproto(L, NULL);
|
cl->p = luaF_newproto(L, NULL);
|
||||||
LoadFunction(&S, cl->p, NULL);
|
LoadFunction(&S, cl->p, NULL);
|
||||||
lua_assert(cl->nupvalues == cl->p->sizeupvalues);
|
lua_assert(cl->nupvalues == cl->p->sp->sizeupvalues);
|
||||||
luai_verifycode(L, buff, cl->p);
|
luai_verifycode(L, buff, cl->p);
|
||||||
return cl;
|
return cl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1163,7 +1163,7 @@ void luaV_execute (lua_State *L) {
|
|||||||
oci->u.l.savedpc = nci->u.l.savedpc;
|
oci->u.l.savedpc = nci->u.l.savedpc;
|
||||||
oci->callstatus |= CIST_TAIL; /* function was tail called */
|
oci->callstatus |= CIST_TAIL; /* function was tail called */
|
||||||
ci = L->ci = oci; /* remove new frame */
|
ci = L->ci = oci; /* remove new frame */
|
||||||
lua_assert(L->top == oci->u.l.base + getproto(ofunc)->maxstacksize);
|
lua_assert(L->top == oci->u.l.base + getproto(ofunc)->sp->maxstacksize);
|
||||||
goto newframe; /* restart luaV_execute over new Lua function */
|
goto newframe; /* restart luaV_execute over new Lua function */
|
||||||
}
|
}
|
||||||
vmbreak;
|
vmbreak;
|
||||||
|
|||||||
Reference in New Issue
Block a user