mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
bugfix Proto is gcobject
This commit is contained in:
@@ -1018,7 +1018,7 @@ LUA_API int lua_load (lua_State *L, lua_Reader reader, void *data,
|
|||||||
LUA_API void lua_clonefunction (lua_State *L, const void * fp) {
|
LUA_API void lua_clonefunction (lua_State *L, const void * fp) {
|
||||||
LClosure *cl;
|
LClosure *cl;
|
||||||
LClosure *f = cast(LClosure *, fp);
|
LClosure *f = cast(LClosure *, fp);
|
||||||
api_check(L, isshared(gcvalue(f->p)), "Not a shared proto");
|
api_check(L, isshared(f->p), "Not a shared proto");
|
||||||
lua_lock(L);
|
lua_lock(L);
|
||||||
cl = luaF_newLclosure(L,f->nupvalues);
|
cl = luaF_newLclosure(L,f->nupvalues);
|
||||||
setclLvalue(L,L->top,cl);
|
setclLvalue(L,L->top,cl);
|
||||||
|
|||||||
Reference in New Issue
Block a user