]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
FFI: Fix cts->L for cdata unsinking in snapshot restore.
authorMike Pall <mike>
Sun, 19 Jan 2014 12:09:20 +0000 (13:09 +0100)
committerMike Pall <mike>
Sun, 19 Jan 2014 12:09:20 +0000 (13:09 +0100)
src/lj_snap.c

index 4d211898f5bc8dee580cf0175446bc355b4cf50c..1c978c26a9a03d47d8bef60c73a9b6ccaac34723 100644 (file)
@@ -708,7 +708,7 @@ static void snap_unsink(jit_State *J, GCtrace *T, ExitState *ex,
             ir->o == IR_CNEW || ir->o == IR_CNEWI);
 #if LJ_HASFFI
   if (ir->o == IR_CNEW || ir->o == IR_CNEWI) {
-    CTState *cts = ctype_ctsG(J2G(J));
+    CTState *cts = ctype_cts(J->L);
     CTypeID id = (CTypeID)T->ir[ir->op1].i;
     CTSize sz = lj_ctype_size(cts, id);
     GCcdata *cd = lj_cdata_new(cts, id, sz);