FFI: Fix __gc for VLA/VLS cdata objects.
This commit is contained in:
@@ -55,7 +55,8 @@ void LJ_FASTCALL lj_cdata_free(global_State *g, GCcdata *cd)
|
||||
{
|
||||
if (LJ_UNLIKELY(cd->marked & LJ_GC_CDATA_FIN)) {
|
||||
GCobj *root;
|
||||
cd->marked = curwhite(g) | LJ_GC_FINALIZED;
|
||||
makewhite(g, obj2gco(cd));
|
||||
obj2gco(cd)->gch.marked |= LJ_GC_FINALIZED;
|
||||
if ((root = gcref(g->gc.mmudata)) != NULL) {
|
||||
setgcrefr(cd->nextgc, root->gch.nextgc);
|
||||
setgcref(root->gch.nextgc, obj2gco(cd));
|
||||
|
||||
Reference in New Issue
Block a user