Skip to content

Commit 6d19f38

Browse files
committed
修复合并错误
1 parent 856d23a commit 6d19f38

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

3rd/lua/lua-latest/lcode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ void luaK_exp2anyregup (FuncState *fs, expdesc *e) {
985985
** or it is a constant.
986986
*/
987987
void luaK_exp2val (FuncState *fs, expdesc *e) {
988-
if (hasjumps(e))
988+
if (e->k == VJMP || hasjumps(e))
989989
luaK_exp2anyreg(fs, e);
990990
else
991991
luaK_dischargevars(fs, e);

3rd/lua/lua-latest/lstate.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,10 @@ int luaE_resetthread (lua_State *L, int status) {
342342
LUA_API int lua_closethread (lua_State *L, lua_State *from) {
343343
int status;
344344
lua_lock(L);
345+
luai_threadcall(L, from);
345346
L->nCcalls = (from) ? getCcalls(from) : 0;
346347
status = luaE_resetthread(L, L->status);
348+
luai_threadret(from, L);
347349
lua_unlock(L);
348350
return status;
349351
}

3rd/lua/lua54/lstate.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,10 @@ int luaE_resetthread (lua_State *L, int status) {
342342
LUA_API int lua_closethread (lua_State *L, lua_State *from) {
343343
int status;
344344
lua_lock(L);
345+
luai_threadcall(L, from);
345346
L->nCcalls = (from) ? getCcalls(from) : 0;
346347
status = luaE_resetthread(L, L->status);
348+
luai_threadret(from, L);
347349
lua_unlock(L);
348350
return status;
349351
}

0 commit comments

Comments
 (0)