Save currently executing lua_State in g->cur_L.
This is only a good approximation due to deficiencies in the design of the Lua/C API. It indicates _some_ valid state that is/was executing. Also reorder L->cframe stores to achieve a synchronously consistent state.
This commit is contained in:
@@ -562,9 +562,9 @@ void LJ_FASTCALL lj_ccallback_leave(CTState *cts, TValue *o)
|
||||
}
|
||||
callback_conv_result(cts, L, o);
|
||||
/* Finally drop C frame and continuation frame. */
|
||||
L->cframe = cframe_prev(L->cframe);
|
||||
L->top -= 2;
|
||||
L->base = obase;
|
||||
L->cframe = cframe_prev(L->cframe);
|
||||
cts->cb.slot = 0; /* Blacklist C function that called the callback. */
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user