patch lua_clonefunction

This commit is contained in:
Cloud Wu
2015-06-18 17:39:37 +08:00
parent 2086e13a46
commit 5d9142110e
18 changed files with 364 additions and 160 deletions

View File

@@ -269,7 +269,7 @@ static void callhook (lua_State *L, CallInfo *ci) {
}
static StkId adjust_varargs (lua_State *L, Proto *p, int actual) {
static StkId adjust_varargs (lua_State *L, SharedProto *p, int actual) {
int i;
int nfixargs = p->numparams;
StkId base, fixed;
@@ -342,7 +342,7 @@ int luaD_precall (lua_State *L, StkId func, int nresults) {
}
case LUA_TLCL: { /* Lua function: prepare its call */
StkId base;
Proto *p = clLvalue(func)->p;
SharedProto *p = clLvalue(func)->p->sp;
n = cast_int(L->top - func) - 1; /* number of real arguments */
luaC_checkGC(L); /* stack grow uses memory */
luaD_checkstack(L, p->maxstacksize);