aboutsummaryrefslogtreecommitdiff
path: root/src/lj_ccallback.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_ccallback.c')
-rw-r--r--src/lj_ccallback.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_ccallback.c b/src/lj_ccallback.c
index d872d671..b234ec67 100644
--- a/src/lj_ccallback.c
+++ b/src/lj_ccallback.c
@@ -529,7 +529,7 @@ lua_State * LJ_FASTCALL lj_ccallback_enter(CTState *cts, void *cf)
529 lua_State *L = cts->L; 529 lua_State *L = cts->L;
530 global_State *g = cts->g; 530 global_State *g = cts->g;
531 lua_assert(L != NULL); 531 lua_assert(L != NULL);
532 if (gcref(g->jit_L)) { 532 if (tvref(g->jit_base)) {
533 setstrV(L, L->top++, lj_err_str(L, LJ_ERR_FFI_BADCBACK)); 533 setstrV(L, L->top++, lj_err_str(L, LJ_ERR_FFI_BADCBACK));
534 if (g->panic) g->panic(L); 534 if (g->panic) g->panic(L);
535 exit(EXIT_FAILURE); 535 exit(EXIT_FAILURE);
@@ -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