aboutsummaryrefslogtreecommitdiff
path: root/src/lj_ccallback.c
diff options
context:
space:
mode:
authorMike Pall <mike>2013-08-28 13:06:19 +0200
committerMike Pall <mike>2013-08-30 23:38:17 +0200
commit517500ba48a290699d5a2ec7465bf76a5109c49f (patch)
treeb780b0919bd2b79db462d0f392158d4b1ee6339c /src/lj_ccallback.c
parent5120240b77e4544b9b7405b4849a6cc63cdbbe1e (diff)
downloadluajit-517500ba48a290699d5a2ec7465bf76a5109c49f.tar.gz
luajit-517500ba48a290699d5a2ec7465bf76a5109c49f.tar.bz2
luajit-517500ba48a290699d5a2ec7465bf76a5109c49f.zip
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.
Diffstat (limited to 'src/lj_ccallback.c')
-rw-r--r--src/lj_ccallback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_ccallback.c b/src/lj_ccallback.c
index 37f45bf5..9805d265 100644
--- a/src/lj_ccallback.c
+++ b/src/lj_ccallback.c
@@ -562,9 +562,9 @@ void LJ_FASTCALL lj_ccallback_leave(CTState *cts, TValue *o)
562 } 562 }
563 callback_conv_result(cts, L, o); 563 callback_conv_result(cts, L, o);
564 /* Finally drop C frame and continuation frame. */ 564 /* Finally drop C frame and continuation frame. */
565 L->cframe = cframe_prev(L->cframe);
566 L->top -= 2; 565 L->top -= 2;
567 L->base = obase; 566 L->base = obase;
567 L->cframe = cframe_prev(L->cframe);
568 cts->cb.slot = 0; /* Blacklist C function that called the callback. */ 568 cts->cb.slot = 0; /* Blacklist C function that called the callback. */
569} 569}
570 570