FFI: Turn FFI finalizer table into a proper GC root.
Reported by Sergey Bronnikov. #1168
This commit is contained in:
@@ -177,7 +177,6 @@ typedef struct CTState {
|
||||
MSize sizetab; /* Size of C type table. */
|
||||
lua_State *L; /* Lua state (needed for errors and allocations). */
|
||||
global_State *g; /* Global state. */
|
||||
GCtab *finalizer; /* Map of cdata to finalizer. */
|
||||
GCtab *miscmap; /* Map of -CTypeID to metatable and cb slot to func. */
|
||||
CCallback cb; /* Temporary callback state. */
|
||||
CTypeID1 hash[CTHASH_SIZE]; /* Hash anchors for C type table. */
|
||||
@@ -476,6 +475,7 @@ LJ_FUNC GCstr *lj_ctype_repr(lua_State *L, CTypeID id, GCstr *name);
|
||||
LJ_FUNC GCstr *lj_ctype_repr_int64(lua_State *L, uint64_t n, int isunsigned);
|
||||
LJ_FUNC GCstr *lj_ctype_repr_complex(lua_State *L, void *sp, CTSize size);
|
||||
LJ_FUNC CTState *lj_ctype_init(lua_State *L);
|
||||
LJ_FUNC void lj_ctype_initfin(lua_State *L);
|
||||
LJ_FUNC void lj_ctype_freestate(global_State *g);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user