mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
FFI: Add missing write barrier on C library index update.
Contributed by Yichun Zhang.
This commit is contained in:
parent
478bcfe52a
commit
1d1bac5a65
@ -364,6 +364,7 @@ TValue *lj_clib_index(lua_State *L, CLibrary *cl, GCstr *name)
|
|||||||
cd = lj_cdata_new(cts, id, CTSIZE_PTR);
|
cd = lj_cdata_new(cts, id, CTSIZE_PTR);
|
||||||
*(void **)cdataptr(cd) = p;
|
*(void **)cdataptr(cd) = p;
|
||||||
setcdataV(L, tv, cd);
|
setcdataV(L, tv, cd);
|
||||||
|
lj_gc_anybarriert(L, cl->cache);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tv;
|
return tv;
|
||||||
|
Loading…
Reference in New Issue
Block a user