FFI: Add missing GC barrier for callback registration.

This commit is contained in:
Mike Pall 2011-11-15 16:43:43 +01:00
parent d4df8d7825
commit b1efcef745

View File

@ -453,6 +453,7 @@ void *lj_ccallback_new(CTState *cts, CType *ct, GCfunc *fn)
MSize slot = callback_slot_new(cts, ct);
GCtab *t = cts->miscmap;
setfuncV(cts->L, lj_tab_setint(cts->L, t, (int32_t)slot), fn);
lj_gc_anybarriert(cts->L, t);
return callback_slot2ptr(cts, slot);
}
return NULL; /* Bad conversion. */