FFI: Fix __gc for VLA/VLS cdata objects.

This commit is contained in:
Mike Pall
2011-05-23 02:43:36 +02:00
parent 288085afbe
commit 7b21a660a8
3 changed files with 8 additions and 5 deletions

View File

@@ -38,6 +38,8 @@ enum {
#define curwhite(g) ((g)->gc.currentwhite & LJ_GC_WHITES)
#define newwhite(g, x) (obj2gco(x)->gch.marked = (uint8_t)curwhite(g))
#define makewhite(g, x) \
((x)->gch.marked = ((x)->gch.marked & (uint8_t)~LJ_GC_COLORS) | curwhite(g))
#define flipwhite(x) ((x)->gch.marked ^= LJ_GC_WHITES)
#define black2gray(x) ((x)->gch.marked &= (uint8_t)~LJ_GC_BLACK)
#define fixstring(s) ((s)->marked |= LJ_GC_FIXED)